Skip to content

Commit

Permalink
Add: sample_filter param to demultiplexing module
Browse files Browse the repository at this point in the history
  • Loading branch information
dileep-kishore committed Mar 1, 2023
1 parent 1bd0167 commit 479c7b5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions micone/pipelines/configs/sequence_processing.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ params {
rev_comp_barcodes = false
rev_comp_mapping_barcodes = false
}
'export_sequences' {
sample_filter = ""
}
}
// Trim filter workflow
trimming {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ process export_sequences {
script:
String task_process = "${task.process}"
f = getHierarchy(task_process)
sample_filter = params.sequence_processing.demultiplexing['export_sequences']['sample_filter']
template 'sequence_processing/demultiplexing/export_sequences.sh'
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,11 @@
qiime tools export \
--input-path "${demux_artifact}" \
--output-path demux_seqs

if [[ '${sample_filter}' ]]; then
cd demux_seqs || exit
ls -1 | grep -v '${sample_filter}' | xargs rm -f
mv MANIFEST MANIFEST_OLD
sed '/sample-id\|${sample_filter}/!d' MANIFEST_OLD >MANIFEST
rm MANIFEST_OLD
fi

0 comments on commit 479c7b5

Please sign in to comment.