Commit b412a7fa authored by Xavier Grand's avatar Xavier Grand
Browse files

indexed genome params

parent b4af1b0e
......@@ -32,9 +32,8 @@ params.genome = "data/tinyTestDataset/*.fasta"
@type: File
*/
/*
params.folder = "project"
/* project output folder
params.idxgenome = ""
/* already indexed reference genome
@Type: String
*/
......@@ -46,7 +45,8 @@ params.folder = "project"
*/
log.info "fastq files : ${params.fastq}"
log.info "genome files : ${params.genome}"
log.info "genome file : ${params.genome}"
log.info "indexed genome file : ${params.idxgenome}"
/*
log.info "paired-end data: ${params.paired_end}"
......@@ -74,6 +74,10 @@ Channel
.fromFilePairs( params.genome, size: -1 )
.set { genome_file }
Channel
.fromPath( params.idxgenome )
.set { genome_idx }
/*
****************************************************************
Imports
......@@ -113,11 +117,13 @@ workflow {
fastqc_preprocessed.out.report
).collect()
)
// index reference genome
index_fasta(genome_file)
// mapping preprocessed reads
mapping_fastq(index_fasta.out.index.collect(), fastp_default.out.fastq)
// index reference genome & mapping preprocessed reads
if (!params.idxgenome) {
index_fasta(genome_file)
mapping_fastq(index_fasta.out.index.collect(), fastp_default.out.fastq)
} else {
mapping_fastq(genome_idx.collect(), fastp_default.out.fastq)
}
// filter bam - remove reads with quality <30
filter_bam_quality(mapping_fastq.out.bam)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment