# BiTIA run Executes the pipeline in server [public.bitia.link/api](https://public.bitia.link/api/) and displays the output in the CLI simultaneously. <div id="termynal" data-termynal> <span data-ty="input"><b>bitia run --help</b></span> <span data-ty>Using server <a style="color:blue">https://public.bitia.link/api/v1</a> <span data-ty> Usage: python -m bitia run [OPTIONS] USER_INPUT<br> Run a pipeline<br> <b><i>Arguments</i></b> <br><br> \* <b>user_input</b> TEXT [default: None] [required]<br><br> <i><b>Options</i></b> <br><br> <b>--rerun</b> --no-rerun [default: no-rerun] <b>--output-lines </b> TEXT< <b>--help </b> Show this message and exit. </span> </div> The Argument `user_input` for executing tasks can be used in three ways: 1. [Executing single line commands](#1-executing-single-line-commands) 2. [Executing pipelines](#2-executing-pipelines) 3. [Executing directories with multiple required files](#3-executing-directories-with-multiple-required-files) ## 1. Executing Single line Commands For executing any single task of bioInformatics pipeline, we can instruct Bitia using single-line commands. syntaxes for specifying tasks: <div id="termynal" data-termynal style="width:50%"> <b>bitia</b> <b>run</b> "command <input-link>" </div> <br> <b><input-link></b> can be used in two ways: 1. specify url that downloads file with same name as input ```` bitia run "fastqc <https://zenodo.org/record/3736457/files/1_control_18S_2019_minq7%20-%20Copy.fastq>" ```` 2. specify filename with url where url does'nt download file with same name as input. ```` bitia run "fastqc <sampple.fastq|https://zenodo.org/record/3736457/files/1_control_18S_2019_minq7%20-%20Copy.fastq>" ```` ## 2. Executing Pipelines <div id="termynal1" data-termynal> <span data-ty="input">bitia run pipeline.sh</span> <span data-ty>Using server <a style="color:blue">https://public.bitia.link/api/v1</a> <span data-ty="progress"></span> </div> 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 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`. - executing the commands given in the pipeline - Displays the resulting output to the user console ## 3. Executing Directories with multiple required files <div id="termynal2" data-termynal> <span data-ty="input">bitia run work</span> <span data-ty>Using server <a style="color:blue">https://public.bitia.link/api/v1</a> <span data-ty="progress"></span> </div> Here `work` directory has two files `main.bitia.sh` and `input_file_links.txt` for `main.bitia.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 ``` and `input_file_links.txt` ```bash ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR200/058/SRR20076358/SRR20076358_1.fastq.gz ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR200/058/SRR20076358/SRR20076358_2.fastq.gz ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR200/061/SRR20076361/SRR20076361_1.fastq.gz ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR200/061/SRR20076361/SRR20076361_2.fastq.gz ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR200/063/SRR20076363/SRR20076363_1.fastq.gz ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR200/063/SRR20076363/SRR20076363_2.fastq.gz ``` The above code will: - Extract the given directory with `main.bitia.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 by: - Downloading the given input files which are mentioned in `input_files.txt`. - Installing the given commands `fastqc`, `trim_galore`,`hisat2`. - Executing the commands given in the pipeline - Displays the resulting output to the user console <script type="text/javascript" src="https://raw.githack.com/Ganz1285/terminal/main/termynal.js" data-termynal-container="#termynal|#termynal1|#termynal2"></script>