Skip to content
Snippets Groups Projects
Working.md 2.24 KiB
Newer Older
selva's avatar
selva committed
# Working with BiTIA CLI
selva's avatar
selva committed
The three commands that are the core of BiTIA's functionality are:
selva's avatar
selva committed
- run
- submit
selva's avatar
selva committed
- logs
selva's avatar
selva committed

selva's avatar
selva committed
<link type="text/css" href="../_static/./css/termynal.css" />
selva's avatar
selva committed


selva's avatar
selva committed
### Bitia run can be employed in the following ways:
selva's avatar
selva committed

selva's avatar
selva committed
#### 1. Running commands
selva's avatar
selva committed

selva's avatar
selva committed
<div id="termynal" data-termynal>
    <span data-ty="input">bitia run "samtools convert < foo.fa|http://y.com/foo.fa >"</span>
    <span data-ty="progress"></span>
</div>
selva's avatar
selva committed
The above code will: 
selva's avatar
selva committed
- Checks for the input file `foo.fa` in the current working directory
selva's avatar
selva committed
- Download the input file from the given link `http://example.com/foo.fa` and name it `foo.fa`
selva's avatar
selva committed
- Add the given command `samtools convert <foo.fa|http://example.com/foo.fa` into a pipeline file.
selva's avatar
selva committed
- Extract the current working directory with the pipeline as a zip file that contains a unique hash and send it to the server `public.bitia.link`
- The BiTIA runner in the server will execute the pipeline by: 
    - Installing the given command  `samtools`
selva's avatar
selva committed
    - Downloading the given input file from the link  `http://example.com/foo.fa` and name it `foo.fa`
    - Executing the command `samtools convert foo.fa` 
selva's avatar
selva committed
- Display the resulting output to the user console
selva's avatar
selva committed

selva's avatar
selva committed
#### 2. Running Pipelines
selva's avatar
selva committed

selva's avatar
selva committed
<div id="termynal" data-termynal>
    <span data-ty="input">bitia run "samtools convert < foo.fa|http://y.com/foo.fa >"</span>
    <span data-ty="progress"></span>
</div>

selva's avatar
selva committed
for `pipeline.sh`:
```bash
#!/usr/bin/env bash

fastqc *.gz

for file in *_1.fastq.gz
do
   trim_galore --cores 8 --gzip --fastqc --max_n 2 --output_dir Trimmed_Data/ --paired $file ${file%_1.fastq.gz}_2.fastq.gz
done

hisat2-build -p 8 ./Homo_sapiens/UCSC/hg38/Sequence/WholeGenomeFasta/genome.fa index
```

selva's avatar
selva committed
The above code will:
selva's avatar
selva committed
- Extract the current working directory with the `pipeline.sh` as a zip file containing a unique hash and send it to the public `server.bitia.link`
- The BiTIA runner in the server will execute the pipeline .
    - Installing the given commands `fastqc`, `trim_galore`,`hisat2`.
selva's avatar
selva committed
    - executing the commands given in the pipeline
selva's avatar
selva committed
- Displays the resulting output to the user console
selva's avatar
selva committed



selva's avatar
selva committed

<script type="text/javascript" src="https://raw.githack.com/tiangolo/fastapi/master/docs/en/docs/js/termynal.js" data-termynal-container="#termynal"></script>