Skip to content

Commit

Permalink
Merge pull request #282 from /issues/281-export-transgene-fusions
Browse files Browse the repository at this point in the history
Export transgene fusions (resolves #281)
  • Loading branch information
arkal authored May 10, 2018
2 parents ee863ba + 42bdd24 commit 101565a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/protect/mutation_translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,11 @@ def run_transgene(job, snpeffed_file, rna_bam, univ_options, transgene_options,
os.rename('transgened_transgened.vcf', 'mutations.vcf')
export_results(job, job.fileStore.writeGlobalFile('mutations.vcf'), 'mutations.vcf',
univ_options, subfolder='mutations/transgened')
if fusion_calls:
# There won't be an output bedpe if there's no input
os.rename('transgened_transgened.bedpe', 'fusions.bedpe')
export_results(job, job.fileStore.writeGlobalFile('fusions.bedpe'), 'fusions.bedpe',
univ_options, subfolder='mutations/transgened')

job.fileStore.logToMaster('Ran transgene on %s successfully' % univ_options['patient'])
return output_files
16 changes: 13 additions & 3 deletions src/protect/test/ci/test_protect.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,12 @@ def _test_ran_successfully(self, expected_dirs):
'snpeffed': ('/mnt/ephemeral/done/TEST/mutations/snpeffed',
[],
['mutations.vcf']),
'transgened': ('/mnt/ephemeral/done/TEST/mutations/transgened',
[],
['mutations.vcf']),
'transgened_f': ('/mnt/ephemeral/done/TEST/mutations/transgened',
[],
['fusions.bedpe', 'mutations.vcf']),
'transgened_v': ('/mnt/ephemeral/done/TEST/mutations/transgened',
[],
['mutations.vcf']),
},
'peptides': ('/mnt/ephemeral/done/TEST/peptides',
[],
Expand Down Expand Up @@ -185,6 +188,13 @@ def _test_ran_successfully(self, expected_dirs):
contents_per_dir['mutations']['strelka']['indel']
expected_contents['mutations_strelka_3'] = \
contents_per_dir['mutations']['strelka']['snv']
elif caller == 'transgened':
if 'fusions' in dir['mutations']:
expected_contents['mutations_' + caller] = \
contents_per_dir['mutations'][caller + '_f']
else:
expected_contents['mutations_' + caller] = \
contents_per_dir['mutations'][caller + '_v']
else:
expected_contents['mutations_' + caller] = \
contents_per_dir['mutations'][caller]
Expand Down

0 comments on commit 101565a

Please sign in to comment.