Skip to content

Commit

Permalink
adding claireS
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacozzuto committed May 30, 2024
1 parent 2f81f18 commit 4e98679
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
25 changes: 19 additions & 6 deletions mop_dna/mop_dna.nf
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ if (params.help) exit 1
if (params.resume) exit 1, "Are you making the classical --resume typo? Be careful!!!! ;)"

// check input files
reference = file(params.reference)
if( !reference.exists() ) exit 1, "Missing reference file: ${reference}!"
reference = channel.fromPath(params.reference, checkIfExists: true)

// include functions, outdirs from other files
evaluate(new File("../outdirs.nf"))
Expand All @@ -63,6 +62,8 @@ include { checkRef } from "${local_modules}"
progPars = getParameters(params.pars_tools)

include { RUN as RUN_CLAIRS } from "${subworkflowsDir}/snp_calling/clairS" addParams(LABEL: 'big_mem_cpus', EXTRAPARS: progPars["clairS--clairS"], OUTPUT: outputClairS)
include { CHECK_FASTA } from "${subworkflowsDir}/misc/misc.nf"
include { FAIDX as SAMTOOLS_FAIDX } from "${subworkflowsDir}/misc/samtools"



Expand Down Expand Up @@ -104,8 +105,9 @@ workflow {
[it, file("${params.input_path}/alignment/${it}_s.bam.bai")]
}.transpose().set{bais}

// ref_file = checkRef(reference)
clairS_flow(bams, comparisons, reference)
checked_genome = CHECK_FASTA(reference)
faidx = SAMTOOLS_FAIDX(checked_genome)
clairS_flow(bams, bais, comparisons, checked_genome, faidx)


}
Expand All @@ -115,12 +117,23 @@ workflow clairS_flow {

take:
bam
bais
comparisons
reference
faidx

main:
data = mapIDPairs(comparisons, bam)
RUN_CLAIRS(data, reference)
bam_comp = mapIDPairs(comparisons, bam).map{
[ "${it[0]}--${it[1]}", it[2], it[3] ]
}


bai_comp = mapIDPairs(comparisons, bais).map{
[ "${it[0]}--${it[1]}", it[2], it[3] ]
}

data = bam_comp.join(bai_comp)
RUN_CLAIRS(data, reference, faidx)

// emit:

Expand Down
1 change: 1 addition & 0 deletions mop_dna/params.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
input_path: "${projectDir}/test_dataset/"
comparison: "${projectDir}/comparison.tsv"

##reference: "${projectDir}/GRCh38.primary_assembly.genome.fa"
reference: "/db/gencode/human/release_38/GRCh38.primary_assembly.genome.fa.gz"
output: "${projectDir}/output_dna"
pars_tools: "${projectDir}/tools_opt.tsv"
Expand Down
3 changes: 3 additions & 0 deletions outdirs.nf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ outputNanoPolComFlow = "${params.output}/nanopolish-compore_flow"
outputTomboFlow = "${params.output}/tombo_flow"
outputModPhredFlow = "${params.output}/modphred_flow"

// mop_dna
outputClairS = "${params.output}/clairS_flow"

// MOP_TAIL
outputTailFindr = "${params.output}/tailfindr_flow"
outputNanopolish = "${params.output}/nanopolish_flow"
Expand Down

0 comments on commit 4e98679

Please sign in to comment.