Skip to content

Commit

Permalink
Add fusion filters for transgene (resolves #237)
Browse files Browse the repository at this point in the history
resolves #237

Added all fusion parameters to the input config so users can control
what fusion filters are applied.
  • Loading branch information
arkal committed May 17, 2018
1 parent 101565a commit f92e489
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
5 changes: 5 additions & 0 deletions MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,11 @@ be substituted with S3 links. Descriptions for creating all files can be found i
gencode_transcript_fasta : /path/to/gencode_transcripts.faa -> The transcript file for the gencode gtf.
gencode_annotation_gtf : /path/to/gencode_annotation.gtf -> The gencode genome annotation file.
genome_fasta : /path/to/hg19.faa -> The gencode genome fasta file
filter_mt_fusions: True -> Switch to filter mitochondrial gene pairs
filter_ig_pairs: True -> Switch to filter immunoglobulin gene pairs
filter_rna_gene_fusions: True -> Switch to filter rna-gene pairs
filter_readthroughs: True -> Switch to filter readthroughs
readthrough_threshold: 500000 -> Threshold below which pairs will be called readthroughs
version: 2.2.2

haplotyping:
Expand Down
12 changes: 11 additions & 1 deletion src/protect/mutation_translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def run_transgene(job, snpeffed_file, rna_bam, univ_options, transgene_options,
'--pep_lens', '9,10,15',
'--cores', str(transgene_options['n']),
'--genome', input_files['genome.fa'],
'--annotation', input_files['annotation.gtf']]
'--annotation', input_files['annotation.gtf'],
'--log_file', '/data/transgene.log']

if snpeffed_file is not None:
parameters.extend(['--snpeff', input_files['snpeffed_muts.vcf']])
Expand All @@ -110,6 +111,15 @@ def run_transgene(job, snpeffed_file, rna_bam, univ_options, transgene_options,
fusion_files = {key: docker_path(path) for key, path in fusion_files.items()}
parameters += ['--transcripts', fusion_files['transcripts.fa'],
'--fusions', fusion_files['fusion_calls']]
if transgene_options['filter_mt_fusions'] is True:
parameters.append('--filter_mt')
if transgene_options['filter_ig_pairs'] is True:
parameters.append('--filter_ig')
if transgene_options['filter_rg'] is True:
parameters.append('--filter_rna_gene_fusions')
if transgene_options['filter_readthroughs'] is True:
parameters.append('--filter_rt')
parameters.extend(['--rt_threshold', transgene_options['readthrough_threshold']])

docker_call(tool='transgene',
tool_parameters=parameters,
Expand Down
5 changes: 5 additions & 0 deletions src/protect/pipeline/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ mutation_annotation:

mutation_translation:
transgene:
filter_mt_fusions: True
filter_ig_pairs: True
filter_rna_gene_fusions: True
filter_readthroughs: True
readthrough_threshold: 500000
version: 2.5.0

haplotyping:
Expand Down
5 changes: 5 additions & 0 deletions src/protect/pipeline/input_parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ mutation_translation:
gencode_peptide_fasta : S3://protect-data/hg38_references/gencode.v25.pc_translations_NOPARY.fa.tar.gz
gencode_transcript_fasta : S3://protect-data/hg38_references/gencode.v25.pc_transcripts_NOPARY.fa.tar.gz
gencode_annotation_gtf : S3://protect-data/hg38_references/gencode.v25.annotation_NOPARY.gtf.tar.gz
filter_mt_fusions: True
filter_ig_pairs: True
filter_rna_gene_fusions: True
filter_readthroughs: True
readthrough_threshold: 500000
genome_fasta : S3://protect-data/hg38_references/hg38.fa.tar.gz
# version: 2.2.2

Expand Down

0 comments on commit f92e489

Please sign in to comment.