Verified Commit 2a991dc6 authored by Laurent Modolo's avatar Laurent Modolo
Browse files

BEDtools: update nf structure

parent 4afb1981
nextflow src/nf_modules/BEDtools/tests/fasta_from_bed.nf \
-c src/nf_modules/BEDtools/bedtools.config \
nextflow src/nf_modules/BEDtools/fasta_from_bed.nf \
-c src/nf_modules/BEDtools/fasta_from_bed.config \
-profile docker \
--fasta "data/tiny_dataset/fasta/tiny_v2.fasta" \
--bed "data/tiny_dataset/annot/tiny.bed" \
params.fastq = "$baseDir/data/fasta/*.fasta"
params.bed = "$baseDir/data/annot/*.bed"
log.info "fasta file : ${params.fasta}"
log.info "bed file : ${params.bed}"
Channel
.fromPath( params.fasta )
.ifEmpty { error "Cannot find any fasta files matching: ${params.fasta}" }
.set { fasta_files }
Channel
.fromPath( params.bed )
.ifEmpty { error "Cannot find any bed files matching: ${params.bed}" }
.set { bed_files }
process fasta_from_bed {
tag "${bed.baseName}"
cpus 4
publishDir "results/fasta/", mode: 'copy'
input:
file fasta from fasta_files
file bed from bed_files
output:
file "*_extracted.fasta" into fasta_files_extracted
script:
"""
bedtools getfasta -name \
-fi ${fasta} -bed ${bed} -fo ${bed.baseName}_extracted.fasta
"""
}
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