Skip to content
Permalink
Browse files

minor: all functions are now strings (#3)

  • Loading branch information...
diljotgrewal authored and amcpherson committed Mar 15, 2019
1 parent cf20128 commit 86c07c6bf4ab396236083242ca6f74dfc36d5d2e
Showing with 21 additions and 25 deletions.
  1. +21 −25 destruct/workflow.py
@@ -4,10 +4,6 @@
import pypeliner.workflow
import pypeliner.managed as mgd

import destruct.score_stats
import destruct.utils.misc
import destruct.utils.seq
import destruct.predict_breaks
import destruct.tasks
import destruct.defaultconfig

@@ -125,7 +121,7 @@ def create_destruct_fastq_workflow(
name='readstats',
axes=('bylibrary',),
ctx=lowmem,
func=destruct.tasks.read_stats,
func='destruct.tasks.read_stats',
ret=mgd.TempOutputObj('stats', 'bylibrary'),
args=(
mgd.InputFile('stats.txt', 'bylibrary', fnames=stats_filenames),
@@ -139,7 +135,7 @@ def create_destruct_fastq_workflow(
name='prepseed_sample',
axes=('bylibrary',),
ctx=medmem,
func=destruct.tasks.prepare_seed_fastq,
func='destruct.tasks.prepare_seed_fastq',
args=(
mgd.InputFile('sample1.fq.gz', 'bylibrary', fnames=sample1_filenames),
mgd.InputFile('sample2.fq.gz', 'bylibrary', fnames=sample2_filenames),
@@ -181,7 +177,7 @@ def create_destruct_fastq_workflow(
name='scorestats',
axes=('bylibrary',),
ctx=medmem,
func=destruct.score_stats.create_score_stats,
func='destruct.score_stats.create_score_stats',
args=(
mgd.TempInputFile('samples.align.true', 'bylibrary'),
config['match_score'],
@@ -195,7 +191,7 @@ def create_destruct_fastq_workflow(
name='splitfastq1',
axes=('bylibrary',),
ctx=lowmem,
func=destruct.tasks.split_fastq,
func='destruct.tasks.split_fastq',
args=(
mgd.InputFile('reads1.fq.gz', 'bylibrary', fnames=fastq1_filenames),
int(config['reads_per_split']),
@@ -207,7 +203,7 @@ def create_destruct_fastq_workflow(
name='splitfastq2',
axes=('bylibrary',),
ctx=lowmem,
func=destruct.tasks.split_fastq,
func='destruct.tasks.split_fastq',
args=(
mgd.InputFile('reads2.fq.gz', 'bylibrary', fnames=fastq2_filenames),
int(config['reads_per_split']),
@@ -219,7 +215,7 @@ def create_destruct_fastq_workflow(
name='prepseed',
axes=('bylibrary', 'byread'),
ctx=medmem,
func=destruct.tasks.prepare_seed_fastq,
func='destruct.tasks.prepare_seed_fastq',
args=(
mgd.TempInputFile('reads1', 'bylibrary', 'byread'),
mgd.TempInputFile('reads2', 'bylibrary', 'byread'),
@@ -268,7 +264,7 @@ def create_destruct_fastq_workflow(
name='merge_spanning_1',
axes=('bylibrary',),
ctx=lowmem,
func=destruct.tasks.merge_files_by_line,
func='destruct.tasks.merge_files_by_line',
args=(
mgd.TempInputFile('spanning.alignments', 'bylibrary', 'byread'),
mgd.TempOutputFile('spanning.alignments_1', 'bylibrary'),
@@ -292,7 +288,7 @@ def create_destruct_fastq_workflow(
name='merge_split_1',
axes=('bylibrary',),
ctx=lowmem,
func=destruct.tasks.merge_files_by_line,
func='destruct.tasks.merge_files_by_line',
args=(
mgd.TempInputFile('split.alignments', 'bylibrary', 'byread'),
mgd.TempOutputFile('split.alignments', 'bylibrary'),
@@ -302,7 +298,7 @@ def create_destruct_fastq_workflow(
workflow.transform(
name='merge_spanning_2',
ctx=lowmem,
func=destruct.tasks.merge_alignment_files,
func='destruct.tasks.merge_alignment_files',
args=(
mgd.TempInputFile('spanning.alignments', 'bylibrary'),
mgd.TempOutputFile('spanning.alignments'),
@@ -313,7 +309,7 @@ def create_destruct_fastq_workflow(
workflow.transform(
name='merge_split_2',
ctx=lowmem,
func=destruct.tasks.merge_alignment_files,
func='destruct.tasks.merge_alignment_files',
args=(
mgd.TempInputFile('split.alignments', 'bylibrary'),
mgd.TempOutputFile('split.alignments'),
@@ -331,7 +327,7 @@ def create_destruct_fastq_workflow(
workflow.transform(
name='write_stats_table',
ctx=lowmem,
func=destruct.tasks.write_stats_table,
func='destruct.tasks.write_stats_table',
args=(
mgd.TempInputObj('library_id', 'bylibrary'),
mgd.TempInputObj('stats', 'bylibrary'),
@@ -360,7 +356,7 @@ def create_destruct_fastq_workflow(
name='predict_breaks',
axes=('bychromarg',),
ctx=medmem,
func=destruct.predict_breaks.predict_breaks,
func='destruct.predict_breaks.predict_breaks',
args=(
mgd.TempInputFile('clusters', 'bychromarg'),
mgd.TempInputFile('spanning.alignments'),
@@ -372,7 +368,7 @@ def create_destruct_fastq_workflow(
workflow.transform(
name='merge_clusters',
ctx=lowmem,
func=destruct.tasks.merge_clusters,
func='destruct.tasks.merge_clusters',
args=(
mgd.TempInputFile('clusters', 'bychromarg'),
mgd.TempInputFile('breakpoints_2', 'bychromarg'),
@@ -410,7 +406,7 @@ def create_destruct_fastq_workflow(
name='calculate_realignment_likelihoods',
axes=('bylibrary', 'byread'),
ctx=medmem,
func=destruct.predict_breaks.calculate_realignment_likelihoods,
func='destruct.predict_breaks.calculate_realignment_likelihoods',
args=(
mgd.TempInputFile('breakpoints_2'),
mgd.TempInputFile('realignments', 'bylibrary', 'byread'),
@@ -426,7 +422,7 @@ def create_destruct_fastq_workflow(
name='merge_likelihoods_1',
axes=('bylibrary',),
ctx=lowmem,
func=destruct.tasks.merge_sorted_files_by_line,
func='destruct.tasks.merge_sorted_files_by_line',
args=(
mgd.TempInputFile('likelihoods_2', 'bylibrary', 'byread'),
mgd.TempOutputFile('likelihoods_2', 'bylibrary'),
@@ -438,7 +434,7 @@ def create_destruct_fastq_workflow(
workflow.transform(
name='merge_likelihoods_2',
ctx=lowmem,
func=destruct.tasks.merge_sorted_files_by_line,
func='destruct.tasks.merge_sorted_files_by_line',
args=(
mgd.TempInputFile('likelihoods_2', 'bylibrary'),
mgd.TempOutputFile('likelihoods_2'),
@@ -452,7 +448,7 @@ def create_destruct_fastq_workflow(
workflow.transform(
name='calc_weights',
ctx=medmem,
func=destruct.predict_breaks.calculate_cluster_weights,
func='destruct.predict_breaks.calculate_cluster_weights',
args=(
mgd.TempInputFile('breakpoints_2'),
mgd.TempOutputFile('cluster_weights'),
@@ -475,7 +471,7 @@ def create_destruct_fastq_workflow(
workflow.transform(
name='select_clusters',
ctx=medmem,
func=destruct.predict_breaks.select_clusters,
func='destruct.predict_breaks.select_clusters',
args=(
mgd.TempInputFile('clusters_setcover'),
mgd.TempInputFile('breakpoints_2'),
@@ -490,7 +486,7 @@ def create_destruct_fastq_workflow(
workflow.transform(
name='select_predictions',
ctx=himem,
func=destruct.predict_breaks.select_predictions,
func='destruct.predict_breaks.select_predictions',
args=(
mgd.TempInputFile('breakpoints_1'),
mgd.TempOutputFile('breakpoints'),
@@ -507,7 +503,7 @@ def create_destruct_fastq_workflow(
workflow.transform(
name='tabreads',
ctx=medmem,
func=destruct.tasks.tabulate_reads,
func='destruct.tasks.tabulate_reads',
args=(
mgd.TempInputFile('clusters_setcover'),
mgd.TempInputObj('library_id', 'bylibrary'),
@@ -533,7 +529,7 @@ def create_destruct_fastq_workflow(
workflow.transform(
name='tabulate',
ctx=himem,
func=destruct.tasks.tabulate_results,
func='destruct.tasks.tabulate_results',
args=(
mgd.TempInputFile('breakpoints'),
mgd.TempInputFile('likelihoods'),

0 comments on commit 86c07c6

Please sign in to comment.
You can’t perform that action at this time.