forked from biocorecrg/BioNextflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
testFunctions.nf
53 lines (49 loc) · 1.81 KB
/
testFunctions.nf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env nextflow
/*
* Copyright (c) 2018, Centre for Genomic Regulation (CRG).
*
* This file is part of 'BioNextflow'.
*
* BioNextflow is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BioNextflow is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with BioNextflow. If not, see <http://www.gnu.org/licenses/>.
*/
/*
*
* @authors
* Luca Cozzuto <[email protected]>
*
*
*/
/*
* Check that helper function `mappingPairsWithSTAR` returns the exepcted result
*/
assert BiologicalFunctions.mappingPairsWithSTAR("idA","genome.fa","fastq1",4) == """
if [ `echo no == "debug"` ]; then print="echo "; else print=""; fi
if [ `echo fastq1 | grep ".gz"` ]; then gzip="--readFilesCommand zcat"
else gzip=""
fi
\$print STAR --genomeDir genome.fa \
--readFilesIn fastq1 \
\$gzip \
--outSAMunmapped None \
--outSAMtype BAM SortedByCoordinate \
--runThreadN 4 \
--quantMode GeneCounts \
--outFileNamePrefix idA
\$print mkdir STAR_idA
\$print mv idAAligned* STAR_idA/.
\$print mv idASJ* STAR_idA/.
\$print mv idAReadsPerGene* STAR_idA/.
\$print mv idALog* STAR_idA/.
"""
.stripIndent()