Sign inSign up

jamesgallant/pegasus

By jamesgallant

Updated almost 6 years ago

A Pipeline to call gene fusions based on multigene deletions from Mycobacterium tuberculosis

Image
0

1.0K

jamesgallant/pegasus repository overview

Description

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

Running the pipeline

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
Positionargumentdata typeLong description
1-h,--hDisplay the help menu
1raw filesdirectory pathPath to the raw files
2samplestext fileList of identifiers for the raw files
3output dirdirectory pathPath where files should be saved
4threadsIntergerNumber of CPU cores to allocate
5ramIntergerAmmount of RAM to allocate
6Gene fusionsBoolean (TRUE or FALSE)Find chimeric genes
7ReferenceH37Rv or CDC1551Which reference should be used
8VerboseBoolean (TRUE or FALSE)Run in vebose mode to debug the platform

output

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.

custom reference

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:

posititionargdtypedescription
1custom reffilepathpath to reference file in .fasta format
2annotation filefilepathTabular annotation file from NCBI
3name of referencecharName 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

Tag summary

Content type

Image

Digest

Size

1.1 GB

Last updated

almost 6 years ago

docker pull jamesgallant/pegasus