A Pipeline to call gene fusions based on multigene deletions from Mycobacterium tuberculosis
1.0K
Gene fusions caller based on multigene deletions for bacteria.
This implementation is a minimal version of Pegasus focussed on gene fusions and availible as a docker container. Everything needed is saved within the container and thus no installations are required. Furthermore this container can be used wherever docker is availible. The container is preconfigured to work with M. tuberculosis H37Rv and CDC1551 as references however other genomes can be configured as well.
To use the docker container pull it from docker hub https://hub.docker.com/r/jamesgallant/pegasus
on linux:
sudo docker pull jamesgallant/pegasus
Prepare your files by creating a directory that includes raw illumina files and a file listing each sample line by line. The illumina files require the following naming convention: mysample1_R1_001.fastq.gz, mysample1_R2_001.fastq.gz and the sample file should look like this as an example for three samples:
mysample1
mysample2
mysample3
Run the container and mount the directory containing your illumina files and samples text file. Remeber that the paths need to be absolute to connect the directories between your host system and the container. The host system and the docker system is separated by a :. In the example below myfiles would be the directory to be connected.
sudo run docker -v /home/user/path/to/myfiles:/home/pegasus/myfiles -it jamesgallant/pegasus
ls
You are now in the container and should see all the files availible as well as your myfiles directory. The rest of the docker section handles commands in the container
Make a output directory in your mounted volume
mkdir ./myfiles/out
Run the pipeline by calling the script and adding the positional arguments.
bash Pegasus.sh
| Position | argument | data type | Long description |
|---|---|---|---|
| 1 | -h,--h | Display the help menu | |
| 1 | raw files | directory path | Path to the raw files |
| 2 | samples | text file | List of identifiers for the raw files |
| 3 | output dir | directory path | Path where files should be saved |
| 4 | threads | Interger | Number of CPU cores to allocate |
| 5 | ram | Interger | Ammount of RAM to allocate |
| 6 | Gene fusions | Boolean (TRUE or FALSE) | Find chimeric genes |
| 7 | Reference | H37Rv or CDC1551 | Which reference should be used |
| 8 | Verbose | Boolean (TRUE or FALSE) | Run in vebose mode to debug the platform |
The main outputs are in the results folder for each sample. The results folder contains the bam files as well as the putative chimeras for that sample. Directories for each potential chimera is also created which contains the fasta of the multigene deletion as well as a denovo assembled consensus sequence in the .NoNs.fasta file. This consensus sequence can be used in programs such as ORF finder to check for six frame tranlsations.
It is possible to configure your own reference with some caviats. The detection pipeline is not built to function with plasmids so remove any plasmids from the reference fasta file. Make sure the fasta file is named .fasta and not .fna or .fa. Also unzip the reference file. Use NCBI's tabular output for the annotation file, other formats are not accepted. see and example here: NCBI annotation file .
Add these files to the folder used to import data into the docker container. and run the following script and with the arguments.
bash build_references.sh [arg 1] [arg 2] [arg 3]
These are the accepted positional arguments:
| positition | arg | dtype | description |
|---|---|---|---|
| 1 | custom ref | filepath | path to reference file in .fasta format |
| 2 | annotation file | filepath | Tabular annotation file from NCBI |
| 3 | name of reference | char | Name of the bacteria, eg. Salmonella |
This will configure your reference and can be verified by checking the reference foloder for a new directory with the name provided.
cd ./references
ls
Content type
Image
Digest
Size
1.1 GB
Last updated
almost 6 years ago
docker pull jamesgallant/pegasus