Skip to content

Commit

Permalink
refactor: fastqc ica handling, filtering CDCgov#147 CDCgov#149
Browse files Browse the repository at this point in the history
  • Loading branch information
slsevilla committed Mar 31, 2024
1 parent 25a2ca6 commit 1a6fa53
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
4 changes: 0 additions & 4 deletions modules/local/fastqc.nf
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ process FASTQC {
input:
tuple val(meta), path(reads), val(fairy_outcome)

when:
//if there are scaffolds left after filtering
"${fairy_outcome[3]}" == "PASSED: There are reads in ${meta.id} R1/R2 after trimming."

output:
tuple val(meta), path("*.html"), emit: html
tuple val(meta), path("*.zip") , emit: zip
Expand Down
17 changes: 10 additions & 7 deletions workflows/phoenix.nf
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,17 @@ workflow PHOENIX_EXTERNAL {
)
ch_versions = ch_versions.mix(GET_TRIMD_STATS.out.versions)

// // combing fastp_trimd information with fairy check of reads to confirm there are reads after filtering
// trimd_reads_file_integrity_ch = FASTP_TRIMD.out.reads.join(GET_TRIMD_STATS.out.outcome.splitCsv(strip:true, by:5).map{meta, fairy_outcome -> [meta, [fairy_outcome[0][0], fairy_outcome[1][0], fairy_outcome[2][0], fairy_outcome[3][0], fairy_outcome[4][0]]]}, by: [0,0])
// combing fastp_trimd information with fairy check of reads to confirm there are reads after filtering
trimd_reads_file_integrity_ch = FASTP_TRIMD.out.reads
.join(GET_TRIMD_STATS.out.outcome.splitCsv(strip:true, by:5)
.map{meta, fairy_outcome -> [meta, [fairy_outcome[0][0], fairy_outcome[1][0], fairy_outcome[2][0], fairy_outcome[3][0], fairy_outcome[4][0]]]}, by: [0,0])
.filter { it[2].findAll {!it.contains('FAILED')}}

// // Running Fastqc on trimmed reads
// FASTQCTRIMD (
// trimd_reads_file_integrity_ch
// )
// ch_versions = ch_versions.mix(FASTQCTRIMD.out.versions.first())
// Running Fastqc on trimmed reads
FASTQCTRIMD (
trimd_reads_file_integrity_ch
)
ch_versions = ch_versions.mix(FASTQCTRIMD.out.versions.first())

// // Checking for Contamination in trimmed reads, creating krona plots and best hit files
// KRAKEN2_TRIMD (
Expand Down

0 comments on commit 1a6fa53

Please sign in to comment.