Commit b0ef2a20 authored by peguerin's avatar peguerin
Browse files

first try nextflow

parent 24c72c58
......@@ -48,4 +48,17 @@ verbose as possible — e.g. include the command line, etc
# 4. Running the pipeline
ok
Quickstart
-create a new folder for nextflow to work in
switch to this new folder
open a shell
type in "curl -fsSL get.nextflow.io | bash" to download nextflow into this folder
make sure that the programs stated in the Requirements section below are installed on your machine
after nextflow is downloaded, replace all the "YOUR_***" parts in the following command with your own paths
"./nextflow run main.nf
run your command
that's it ! The pipeline is running and crunching your data. Look for the overview.txt or. overview_new.txt in your output folder after the pipeline is finished
params.str = 'Hello world!'
process echostr {
"""
echo une string
"""
output:
file "coucou.txt" into record
//when:
// < condition >
script:
"""echo '${params.str}' > coucou.txt
"""
}
process readfile {
input:
file tt from record
output:
stdout result
"""
cat $tt
"""
}
result.subscribe { println it }
params.workingfolder="/media/superdisk/edna/training/peg/gitlab_test/only_obitools"
params.datafolder="/media/superdisk/edna/donnees/rhone_test"
sequences= Channel.fromFilePairs(params.datafolder+"/*_R{1,2}.fastq.gz",flat:true)
barcodes=Channel.fromPath(params.datafolder+"/*.dat")
process illuminapairedend {
"""
[t=2h]paired end alignment then keep reads with quality > 40
"""
input:
set val(id), file(R1_fastq), file(R2_fastq) from sequences
output:
file fastqMerged into fastqMergeds
script:
"""
illuminapairedend -r $R2_fastq $R1_fastq --score-min=40 > fastqMerged
"""
}
process remove_unaligned {
"""
[t=1h]remove unaligned sequence records
"""
input:
file fastqMerged from fastqMergeds
output:
file mergedAligned into mergedAligneds
script:
"""
obigrep -p 'mode!="joined"' $fastqMerged > mergedAligned
"""
}
process assign_sequences {
"""
[t=6h]assign each sequence record to the corresponding sample/marker combination
"""
input:
file mergedAligned from mergedAligneds
file barcode from barcodes
output:
file assignedMerged into assigedMergeds
file unassignedMerged into unassignedMergeds
script:
"""
ngsfilter -t $barcode -u unassignedMerged $mergedAligned --fasta-output > assignedMerged
"""
}
process split_sequences {
"""
split the input sequence file in a set of subfiles according to the values of attribute "sample"
"""
input:
file assignedMerged from assigedMergeds
output:
file 'sample_*.fasta' into demultiplexed mode flatten
script:
"""
obisplit -p "sample_" -t sample --fasta $assignedMerged
"""
}
process dereplicate {
input:
file sampleSplit from demultiplexed
output:
dereplicated into dereplicateds
script:
"""
#dereplicate reads into uniq sequences
obiuniq -m sample $sampleSplit > dereplicated
"""
}
Markdown is supported
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