prj init
This commit is contained in:
73
hello_world.nf
Normal file
73
hello_world.nf
Normal file
@@ -0,0 +1,73 @@
|
||||
// ch1 = Channel.value( 'GRCh38' )
|
||||
// ch2 = Channel.value( ['chr1', 'chr2', 'chr3', 'chr4', 'chr5'] )
|
||||
// ch3 = Channel.value( ['chr1' : 248956422, 'chr2' : 242193529, 'chr3' : 198295559] )
|
||||
// ch1.view()
|
||||
// ch2.view()
|
||||
// ch3.view()
|
||||
|
||||
|
||||
// chromosome_ch = Channel.of(1..22, 'X', 'Y')
|
||||
// chromosome_ch.view()
|
||||
|
||||
// ch_vl = Channel.value('GRCh38')
|
||||
// ch_qu = Channel.of(1..4)
|
||||
|
||||
// ch_vl.view()
|
||||
// ch_qu.view()
|
||||
|
||||
// aligner_list = ['salmon', 'kallisto']
|
||||
|
||||
// aligner_ch = Channel.fromList(aligner_list)
|
||||
|
||||
// aligner_ch.view()
|
||||
|
||||
// ids = ['ERR908507', 'ERR908506', 'ERR908505']
|
||||
|
||||
// q_ids = Channel.fromList(ids)
|
||||
// q_ids.view()
|
||||
|
||||
// q_val = Channel.value(ids)
|
||||
// q_val.view()
|
||||
|
||||
// read_ch = Channel.fromPath( '../**.png', hidden: true )
|
||||
// read_ch.view()
|
||||
|
||||
// read_ch = Channel.fromPath( 'data/chicken/reads/*.fq.gz', checkIfExists: true, hidden: true )
|
||||
// read_ch.view()
|
||||
|
||||
|
||||
// -process.debug
|
||||
|
||||
|
||||
// params.chr = "chr2"
|
||||
|
||||
// process CHR_COUNT {
|
||||
|
||||
// script:
|
||||
// """
|
||||
// printf "Number of sequences for chromosome ${params.chr} :"
|
||||
// grep -c '>'${params.chr} ${projectDir}/../Downloads/dm6.fa
|
||||
// """
|
||||
// }
|
||||
|
||||
// workflow {
|
||||
// CHR_COUNT()
|
||||
// }
|
||||
|
||||
process NUM_IDS {
|
||||
|
||||
script:
|
||||
"""
|
||||
#set bash variable NUMIDS
|
||||
NUMIDS=`grep -c '^>' $params.transcriptome`
|
||||
|
||||
echo 'Number of sequences'
|
||||
printf "%'d\n" \$NUMIDS
|
||||
"""
|
||||
}
|
||||
|
||||
params.transcriptome = "${projectDir}/../Downloads/dm6.fa"
|
||||
|
||||
workflow {
|
||||
NUM_IDS()
|
||||
}
|
||||
Reference in New Issue
Block a user