# # Copyright (c) 2017 10X Genomics, Inc. All rights reserved. # # # Copyright (c) 2017 10X Genomics, Inc. All rights reserved. # # # Copyright (c) 2015 10X Genomics, Inc. All rights reserved. # stage ASSEMBLER_PREFLIGHT( in string input_mode, in map[] sample_def, in string barcode_whitelist, in map downsample, in bool check_executables, src py "stages/preflight/denovo", ) # # Copyright (c) 2017 10X Genomics, Inc. All rights reserved. # # # Copyright (c) 2015 10X Genomics, Inc. All rights reserved. # filetype fastb; filetype qualp; filetype bci; filetype fastq.gz; filetype json; filetype script; filetype txt; filetype csv; filetype bv; stage FASTQ_TO_FASTBQUALP( in fastq.gz[] in_reads, out fastb out_reads, out qualp out_quals, out bci out_bci, src py "stages/denovo/assembly_prep", ) split using ( in fastq.gz in_reads_file, ) stage ASSEMBLER_DF( in string sample_id, in string sample_desc, in fastb reads, in qualp quals, in bci bci, in map downsample, in map addin, in string pipeline_id, in string known_sample_id, in bool nodebugmem, in bv mspedges, out path, src py "stages/denovo/df", ) split using ( ) stage ASSEMBLER_TR( in string sample_id, in string sample_desc, in path parent_dir, in string known_sample_id, in map addin, out path, src py "stages/denovo/tr", ) split using ( ) stage ASSEMBLER_MC( in string sample_id, in string sample_desc, in path parent_dir, in string known_sample_id, in map addin, out path, src py "stages/denovo/mc", ) split using ( ) stage ASSEMBLER_CP( in string sample_id, in string sample_desc, in path parent_dir, in string known_sample_id, in map addin, in bool nodebugmem, out path, out csv summary_cs, out txt report, src py "stages/denovo/cp", ) split using ( ) # # Copyright (c) 2014 10X Genomics, Inc. All rights reserved. # # # Copyright (c) 2017 10X Genomics, Inc. All rights reserved. # filetype txt; filetype fastq; filetype fastq.gz; filetype rsd; stage BUCKET_FASTQS( in txt barcode_whitelist_path, in int trim_length, in map[] chunks, in float max_expected_barcode_errors, in float bc_confidence_threshold, in int requested_read_pairs, out int total_reads, out float final_subsample_rate, out rsd[] no_bc_read_buckets, out rsd[] read_buckets, out rsd bc_counts, src exec "tada martian bucket-bcs", ) split using ( in int which, ) stage SORT_FASTQS( in txt barcode_whitelist_path, in rsd[] read_buckets, in float subsample_rate, out fastq.gz[] reads, src exec "tada martian sort-bcs", ) split using ( in int chunk_id, in int total_chunks, ) # # Copyright (c) 2015 10X Genomics, Inc. All rights reserved. # filetype fastq; filetype bam; filetype bam.bai; filetype bed; filetype json; filetype fastq.gz; filetype txt; stage SETUP_CHUNKS( in string sample_id, in map[] sample_def "list of dictionary specifying input data", in string input_mode "configuration of the input fastqs", in string barcode_whitelist, in map downsample, out map[] chunks "map has barcode, barcode_reverse_complement, sample_index, read1, read2, gem_group, and read group fields", out string[] read_groups "list of strings representing read groups", out json downsample_info, out txt barcode_whitelist_path, out int requested_read_pairs, src py "stages/reads/setup_chunks", ) pipeline _FASTQ_PREP_NEW( in string fastq_mode "configuration of the input fastqs", in map[] sample_def, in int trim_length, in string sample_id, in map downsample, in string barcode_whitelist, out fastq.gz[] reads, out string[] read_groups, out json lot_info, out json downsample_info, out txt barcode_whitelist_path, ) { call local volatile SETUP_CHUNKS( sample_id = self.sample_id, downsample = self.downsample, input_mode = self.fastq_mode, sample_def = self.sample_def, barcode_whitelist = self.barcode_whitelist, ) call volatile BUCKET_FASTQS( trim_length = self.trim_length, chunks = SETUP_CHUNKS.chunks, barcode_whitelist_path = SETUP_CHUNKS.barcode_whitelist_path, max_expected_barcode_errors = 1.0, bc_confidence_threshold = 0.975, requested_read_pairs = SETUP_CHUNKS.requested_read_pairs, ) call volatile SORT_FASTQS( barcode_whitelist_path = SETUP_CHUNKS.barcode_whitelist_path, read_buckets = BUCKET_FASTQS.read_buckets, subsample_rate = BUCKET_FASTQS.final_subsample_rate, ) return ( reads = SORT_FASTQS.reads, read_groups = SETUP_CHUNKS.read_groups, lot_info = null, #FIXME downsample_info = SETUP_CHUNKS.downsample_info, barcode_whitelist_path = SETUP_CHUNKS.barcode_whitelist_path, ) } filetype fastb;# binary sequence file filetype qualp;# packed quality scores filetype bci; # barcode index pipeline _ASSEMBLER_PREP( in string sample_id, in string fastq_mode "configuration of the input fastqs", in map[] sample_def, in string barcode_whitelist "name of barcode whitelist file", in int trim_length, in map downsample, out fastb reads, out qualp quals, out bci bci, out fastq.gz[] fqreads, out txt barcode_whitelist_path, ) { call _FASTQ_PREP_NEW( fastq_mode = self.fastq_mode, sample_def = self.sample_def, trim_length = self.trim_length, sample_id = self.sample_id, downsample = self.downsample, barcode_whitelist = self.barcode_whitelist, ) call volatile FASTQ_TO_FASTBQUALP( in_reads = _FASTQ_PREP_NEW.reads, ) return ( reads = FASTQ_TO_FASTBQUALP.out_reads, quals = FASTQ_TO_FASTBQUALP.out_quals, bci = FASTQ_TO_FASTBQUALP.out_bci, fqreads = _FASTQ_PREP_NEW.reads, barcode_whitelist_path = _FASTQ_PREP_NEW.barcode_whitelist_path, ) } # # Copyright (c) 2017 10X Genomics, Inc. All rights reserved. # # # Copyright (c) 2017 10X Genomics, Inc. All rights reserved. # filetype fofn; filetype txt; filetype bv; filetype fastq; filetype fastq.gz; filetype perm; filetype msp; filetype sedge_asm; filetype sedge_bcs; filetype graph; filetype node_bcs; stage MSP( in int trim_min_qual, in fastq.gz[] fastqs, in txt barcode_whitelist, out msp[] chunks, src exec "tada martian msp", ) split using ( in perm permutation, in fastq.gz chunk, ) stage SHARD_ASM( in int min_kmer_obs, in msp[] chunks, out sedge_asm[] sedge_asm, out sedge_bcs[] sedge_bcs, src exec "tada martian shard-asm", ) split using ( in int chunk_id, in int total_chunks, ) stage MAIN_ASM_SN( in sedge_asm[] sedge_asm, in sedge_bcs[] sedge_bcs, out bv asm_graph, src exec "tada martian main-asm-sn", ) split using () pipeline _ASM_SN( in int min_kmer_obs, in fastq.gz[] fastqs, in txt barcode_whitelist, out bv asm_graph, ) { call volatile MSP( trim_min_qual = 7, fastqs = self.fastqs, barcode_whitelist = self.barcode_whitelist, ) call volatile SHARD_ASM( min_kmer_obs = self.min_kmer_obs, chunks = MSP.chunks, ) call volatile MAIN_ASM_SN( sedge_asm = SHARD_ASM.sedge_asm, sedge_bcs = SHARD_ASM.sedge_bcs, ) return ( asm_graph = MAIN_ASM_SN.asm_graph, ) } pipeline _ASSEMBLER( in string pipeline_id, in string sample_id, in string fastq_mode "configuration of the input fastqs", in string sample_desc, in map[] sample_def, in string barcode_whitelist "name of barcode whitelist file", in int trim_length, in string known_sample_id, in map downsample, in bool nodebugmem, in map addin, out path assembly "Raw assembly files", out csv summary "Run summary", out txt report "Run report", ) { call preflight ASSEMBLER_PREFLIGHT( input_mode = self.fastq_mode, sample_def = self.sample_def, barcode_whitelist = self.barcode_whitelist, downsample = self.downsample, check_executables = true, ) call _ASSEMBLER_PREP( sample_id = self.sample_id, fastq_mode = self.fastq_mode, sample_def = self.sample_def, barcode_whitelist = self.barcode_whitelist, trim_length = self.trim_length, downsample = self.downsample, ) call _ASM_SN( min_kmer_obs = 3, fastqs = _ASSEMBLER_PREP.fqreads, barcode_whitelist = _ASSEMBLER_PREP.barcode_whitelist_path, ) call volatile ASSEMBLER_DF( sample_id = self.sample_id, sample_desc = self.sample_desc, reads = _ASSEMBLER_PREP.reads, quals = _ASSEMBLER_PREP.quals, bci = _ASSEMBLER_PREP.bci, downsample = self.downsample, nodebugmem = self.nodebugmem, mspedges = _ASM_SN.asm_graph, known_sample_id = self.known_sample_id, addin = self.addin, pipeline_id = self.pipeline_id, ) call volatile ASSEMBLER_TR( sample_id = self.sample_id, sample_desc = self.sample_desc, parent_dir = ASSEMBLER_DF, known_sample_id = self.known_sample_id, addin = self.addin, ) call volatile ASSEMBLER_MC( sample_id = self.sample_id, sample_desc = self.sample_desc, parent_dir = ASSEMBLER_TR, known_sample_id = self.known_sample_id, addin = self.addin, ) call ASSEMBLER_CP( sample_id = self.sample_id, sample_desc = self.sample_desc, parent_dir = ASSEMBLER_MC, known_sample_id = self.known_sample_id, addin = self.addin, nodebugmem = self.nodebugmem, ) return( assembly = ASSEMBLER_CP, summary = ASSEMBLER_CP.summary_cs, report = ASSEMBLER_CP.report, ) } pipeline ASSEMBLER_CS( in string sample_id, in string fastq_mode "configuration of the input fastqs", in map[] sample_def, in string sample_desc, in map downsample, in bool nodebugmem, out csv summary "Run summary", out txt report "Run report", out path assembly "Raw assembly files", ) { call _ASSEMBLER( pipeline_id = null, sample_id = self.sample_id, fastq_mode = self.fastq_mode, sample_desc = self.sample_desc, sample_def = self.sample_def, barcode_whitelist = "4M-with-alts-february-2016", trim_length = 7, downsample = self.downsample, addin = null, known_sample_id = null, nodebugmem = self.nodebugmem, ) return ( assembly = _ASSEMBLER.assembly, summary = _ASSEMBLER.summary, report = _ASSEMBLER.report, ) } call ASSEMBLER_CS( fastq_mode = "ILMN_BCL2FASTQ", sample_id = "HM2JYBBXX_Geoduck-2_supernova", sample_def = [ { "gem_group": null, "lanes": null, "read_path": "/scratch/10X/HM2JYBBXX_Geoduck-2_supernova/Fastq/fastq_path", "sample_indices": [ "any" ], "sample_names": [ "Geoduck-2" ], "library": null, "bc_in_read": 1, "bc_length": 16 } ], sample_desc = "", downsample = { "target_reads": 1200000000 }, nodebugmem = false, )