Skip to content

Commit

Permalink
reformatting mirna prediction
Browse files Browse the repository at this point in the history
  • Loading branch information
mweyrich28 committed Aug 8, 2024
1 parent 050bb4d commit 1cd2841
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions subworkflows/local/mirna_prediction.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include { MIRNA_BINDINGSITES } from './mirna/mirna_bindingsites'

workflow MIRNA_PREDICTION {

take:
take:
transcriptome_fasta
circrna_annotation
ch_mature
Expand All @@ -25,16 +25,16 @@ workflow MIRNA_PREDICTION {
//

if (params.mirna_expression) {

ch_mirna_normalized = DESEQ2_NORMALIZATION( ch_mirna ).normalized

ch_versions = ch_versions.mix(DESEQ2_NORMALIZATION.out.versions)

ch_mirna_filtered = MIRNA_FILTERING(ch_mirna_normalized,
params.mirna_min_sample_percentage,
ch_mirna_filtered = MIRNA_FILTERING(ch_mirna_normalized,
params.mirna_min_sample_percentage,
params.mirna_min_reads
).filtered

ch_versions = ch_versions.mix(MIRNA_FILTERING.out.versions)

//
Expand All @@ -52,8 +52,8 @@ workflow MIRNA_PREDICTION {
.combine(ch_uniq_mirnas.map{ it -> [it]}) // Not sure why this mapping is necessary but I think it is
.filter{ record, mirnas ->
ch_uniq_mirnas.contains(record.id).value
}.map{ record, mirnas ->
">${record.id}\n${record.seqString}"
}.map{ record, mirnas ->
">${record.id}\n${record.seqString}"
}
.collectFile( name: 'mature_filtered.fa', newLine: true)
.map{ it -> [[id: 'mature_filtered'], it]}
Expand All @@ -70,10 +70,8 @@ workflow MIRNA_PREDICTION {
.splitText(by: 100, file: true)
.map{ meta, file -> [[id: "batch_" + file.baseName.split("\\.").last()], file]}

COMPUTE_CORRELATIONS( ch_binding_site_batches,
ch_mirna_filtered,
quantification_rds )

COMPUTE_CORRELATIONS(ch_binding_site_batches, ch_mirna_filtered, quantification_rds)

ch_correlation_results = COMPUTE_CORRELATIONS.out.correlations
.map{meta, results -> results}
.flatten().collect()
Expand Down

0 comments on commit 1cd2841

Please sign in to comment.