Skip to content

Commit 42f9db3

Browse files
authored
Merge pull request #49 from NBISweden/release/v0.2
Release v0.2
2 parents 48fb74b + 9c53873 commit 42f9db3

File tree

9 files changed

+350
-134
lines changed

9 files changed

+350
-134
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
11
.nextflow.*
2+
results*
3+
slurm-*
4+
CEP-1-7*
5+
test_data
6+
.cache
7+
.nextflow

README.md

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ mv ./nextflow ~/bin
1212
### Run the pipeline
1313

1414
```bash
15-
nextflow run NBISweden/wgs-structvar --project <uppmax_project_id> --bam <bamfile.bam> --run_all
15+
nextflow run NBISweden/wgs-structvar --project <uppmax_project_id> --bam <bamfile.bam> --steps manta,fermikit,vep
1616
```
1717

18-
This will run both manta and fermikit and create summary files for everything
19-
in the `results` subdirectory.
18+
This will run both manta and fermikit, annotate the results with variant
19+
effect predictor and create summary files for everything in the `results`
20+
subdirectory.
2021

21-
It is recommended that you set the environment variable `NXF_WORK` to something like
22+
It is recommended that you set the environment variable `NXF_WORK` to
23+
something like
2224

2325
```bash
2426
export NXF_WORK=$SNIC_NOBACKUP/work
@@ -41,6 +43,56 @@ The pipeline will use the following mask files to remove known artifacts:
4143
* From [cc2qe/speedseq](https://github.com/cc2qe/speedseq): https://github.com/cc2qe/speedseq/raw/master/annotations/ceph18.b37.lumpy.exclude.2014-01-15.bed
4244
* From [lh3/varcmp](https://github.com/lh3/varcmp): https://github.com/lh3/varcmp/raw/master/scripts/LCR-hs37d5.bed.gz
4345

46+
47+
## Detailed usage
48+
49+
### Command line options
50+
51+
```
52+
Usage:
53+
nextflow main.nf --bam <bamfile> [more options]
54+
55+
Options:
56+
Required
57+
--bam Input bamfile
58+
--project Uppmax project to log cluster time to
59+
Optional:
60+
(default values in parenthesis where applicable)
61+
--help Show this message and exit
62+
--fastq Input fastqfile (default is bam but with fq as fileending)
63+
Used by fermikit, will be created from the bam file if
64+
missing.
65+
--steps Specify what steps to run, comma separated (manta,vep):
66+
Callers: manta, fermikit
67+
Annotation: vep, snpeff
68+
--outdir Directory where resultfiles are stored (results)
69+
--prefix Prefix for result filenames ()
70+
```
71+
72+
73+
### Customization
74+
75+
The file `nextflow.config` can be used to make some further customizations to
76+
the workflow.
77+
78+
It's probably only the `params` scope of the config file that is of interest
79+
to customize.
80+
81+
The first part has the default values for the command line parameters, see the
82+
usage message for information on them.
83+
84+
The next section has the reference assembly to use, both as fasta and assembly
85+
name.
86+
87+
The `modules` section contains all modules used by the workflow and their
88+
versions, change modules here not in the `main.nf` file.
89+
90+
Finally the `runtime` section has the different runtimes for the different
91+
parts of the workflow. `fermikit` has it's own timespec since that is a very
92+
long running program, otherwise the workflow differentiates between `callers`
93+
and other supporting `simple` single-core jobs.
94+
95+
4496
## External links
4597

4698
* [NextFlow website](http://www.nextflow.io)

bin/uppmax_make_test_data.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
module load bioinfo-tools
4+
module load samtools
5+
6+
set -x
7+
8+
CHR="1 2"
9+
FN="1-2"
10+
11+
BASEDIR=/proj/a2009002/webexport/opendata/HiSeqX_CEPH/CEP-1-7/03-BAM
12+
BASEFILE=CEP-1-7.clean.dedup.recal
13+
14+
OUT="$BASEFILE.chr$FN"
15+
16+
if [ ! -f $OUT.bam ]; then
17+
samtools view -bh "$BASEDIR/$BASEFILE.bam" $CHR > $OUT.bam
18+
fi
19+
20+
if [ ! -f $OUT.bam.bai ]; then
21+
samtools index $OUT.bam
22+
fi
23+
24+
if [ ! -f $OUT.fq.gz ]; then
25+
samtools bam2fq $OUT.bam | gzip - > $OUT.fq.gz
26+
fi
-246 KB
Binary file not shown.

data/sample.bam

Whitespace-only changes.

docs/workflow.dot

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
digraph {
2+
annotate [label="vep OR snpEFF"];
3+
bamfile -> manta -> annotate [style=bold,color=red];
4+
bamfile -> fermikit -> annotate [style=bold];
5+
bamfile -> tiddit -> annotate [style=dotted];
6+
bamfile -> CNVnator -> annotate [style=dotted];
7+
8+
{manta; fermikit} -> mask [style=bold];
9+
{tiddit; CNVnator} -> mask [style=dotted];
10+
11+
mask -> intersect [label="manta",style=bold];
12+
mask -> intersect [label="fermikit",style=bold];
13+
14+
intersect -> intersect_deletions -> annotate [style=bold];
15+
intersect -> intersect_insertions -> annotate [style=bold];
16+
intersect -> intersect_duplications -> annotate [style=bold];
17+
18+
}

docs/workflow.dot.png

89.2 KB
Loading

0 commit comments

Comments
 (0)