Skip to content
Snippets Groups Projects
Working.md 1.53 KiB
Newer Older
selva's avatar
selva committed
# Working with BiTIA CLI
selva's avatar
selva committed
BiTIA has three commands to work on it:
selva's avatar
selva committed
- run
- submit
selva's avatar
selva committed
- logs
selva's avatar
selva committed

selva's avatar
selva committed
### Bitia run can be employed in 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
```bash
selva's avatar
selva committed
$ bitia run "samtools convert foo.fa#http://example.com/foo.fa"
selva's avatar
selva committed
```
selva's avatar
selva committed
The above code will 
- Add the given command `samtools run foo.fa#http://example.com/foo.fa` into a pipeline file.
- Extract the current working directory with the pipeline as zip file with a unique hash and sent to the server `public.bitia.link`
- The BiTIA runner in the server will execute the pipeline 
    - Installs the given command  `samtools`
    - Download the given input file form the link  `http://example.com/foo.fa` and name it as `foo.fa`
    - execute the command `samtools convert foo.fa` 
- Displays 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
```bash
$ bitia run pipeline.sh
```
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
```

The above code will 
- Extract the current working directory with the `pipeline.sh` as zip file with a unique hash and sent to the server `public.bitia.link`
- The BiTIA runner in the server will execute the pipeline 
    - Installs the given commands `fastqc`, `trim_galore`,`hisat2` .
    - executes the commands given in the pipeline
- Displays the resulting output to the user console