Skip to content
Snippets Groups Projects
Commit 462bb713 authored by user name's avatar user name
Browse files

Alternative samplesheet for cnv calling - bam/bai files instead of fastq1/fastq2

parent fcb7bd6f
No related branches found
No related tags found
No related merge requests found
...@@ -39,7 +39,7 @@ workflow read_inputs { ...@@ -39,7 +39,7 @@ workflow read_inputs {
/* /*
ch_samplesheet_info - Tuple channel of individual ID, r1 fastqs and r2 fastqs: ch_samplesheet_info - Tuple channel of individual ID, r1 fastqs and r2 fastqs -OR- BAM and BAI files:
[ [
[ [
indv1, indv1,
...@@ -53,11 +53,19 @@ workflow read_inputs { ...@@ -53,11 +53,19 @@ workflow read_inputs {
] ]
*/ */
ch_samplesheet = Channel.fromPath(params.sample_sheet, checkIfExists: true) ch_samplesheet = Channel.fromPath(params.sample_sheet, checkIfExists: true)
ch_samplesheet_info = ch_samplesheet.splitCsv(sep:'\t', header: true)
.map( if (params.workflow == 'variant-calling') {
{ line -> [line.individual_id, file(line.read_1), file(line.read_2), line.bam]} ch_samplesheet_info = ch_samplesheet.splitCsv(sep:'\t', header: true)
) .map(
.groupTuple() { line -> [line.individual_id, file(line.read_1), file(line.read_2)]}
)
.groupTuple()
} else if (params.workflow == 'cnv-calling') {
ch_samplesheet_info = ch_samplesheet.splitCsv(sep:'\t', header: true)
.map(
{ line -> [line.individual_id, file(line.bam), file(line.bai)]}
)
}
/* /*
ch_individuals - merge of samplesheet and ped file information: ch_individuals - merge of samplesheet and ped file information:
...@@ -97,7 +105,7 @@ workflow read_inputs { ...@@ -97,7 +105,7 @@ workflow read_inputs {
] ]
*/ */
ch_individuals_by_family = ch_individuals.map({[it[1], it]}) ch_individuals_by_family = ch_individuals.map({[it[1], it]})
emit: emit:
ch_ped_file = ch_ped_file ch_ped_file = ch_ped_file
ch_ped_file_info = ch_ped_file_info ch_ped_file_info = ch_ped_file_info
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment