generated from carpentries-incubator/template
-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from carpentries-incubator/agnostic
Agnostic
- Loading branch information
Showing
34 changed files
with
934 additions
and
862 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
nextflow.enable.dsl=2 | ||
|
||
process NUMSEQ { | ||
script: | ||
"zgrep -c '^>' ${projectDir}/data/yeast/transcriptome/Saccharomyces_cerevisiae.R64-1-1.cdna.all.fa.gz" | ||
} | ||
|
||
workflow { | ||
//process is called like a function in the workflow block | ||
NUMSEQ() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
nextflow.enable.dsl = 2 | ||
//process_conditional.nf | ||
nextflow.enable.dsl=2 | ||
|
||
params.aligner = 'kallisto' | ||
params.method = 'ids' | ||
params.transcriptome = "$projectDir/data/yeast/transcriptome/Saccharomyces_cerevisiae.R64-1-1.cdna.all.fa.gz" | ||
params.kmer = 31 | ||
|
||
process INDEX { | ||
|
||
script: | ||
if( params.aligner == 'kallisto' ) { | ||
""" | ||
echo indexed using kallisto | ||
kallisto index -i index -k $params.kmer $params.transcriptome | ||
""" | ||
} else if( params.aligner == 'salmon' ) { | ||
""" | ||
echo indexed using salmon | ||
salmon index -t $params.transcriptome -i index --kmer $params.kmer | ||
""" | ||
} else { | ||
""" | ||
echo Unknown aligner $params.aligner | ||
""" | ||
} | ||
process COUNT { | ||
script: | ||
if( params.method == 'ids' ) { | ||
""" | ||
echo Number of sequences in transciptome | ||
zgrep -c "^>" $params.transcriptome | ||
""" | ||
} | ||
else if( params.method == 'bases' ) { | ||
""" | ||
echo Number of bases in transciptome | ||
zgrep -v "^>" $params.transcriptome|grep -o "."|wc -l | ||
""" | ||
} | ||
else { | ||
""" | ||
echo Unknown method $params.method | ||
""" | ||
} | ||
} | ||
|
||
workflow { | ||
INDEX() | ||
COUNT() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
nextflow.enable.dsl = 2 | ||
//process_escape_bash.nf | ||
nextflow.enable.dsl=2 | ||
|
||
params.kmer = 31 | ||
process NUM_IDS { | ||
|
||
process INDEX { | ||
script: | ||
""" | ||
#set bash variable NUMIDS | ||
NUMIDS=`zgrep -c '^>' $params.transcriptome` | ||
script: | ||
""" | ||
# set bash variable KMERSIZE | ||
KMERSIZE=$params.kmer | ||
salmon index -t $projectDir/data/yeast/transcriptome/Saccharomyces_cerevisiae.R64-1-1.cdna.all.fa.gz -i index --kmer \$KMERSIZE | ||
echo "kmer size is $params.kmer" | ||
""" | ||
echo 'Number of sequences' | ||
printf "%'d\n" \$NUMIDS | ||
""" | ||
} | ||
|
||
params.transcriptome = "${projectDir}/data/yeast/transcriptome/Saccharomyces_cerevisiae.R64-1-1.cdna.all.fa.gz" | ||
|
||
workflow { | ||
INDEX() | ||
NUM_IDS() | ||
} |
Oops, something went wrong.