Skip to content

Commit

Permalink
Merge branch 'upgrade-samtools' into 'develop'
Browse files Browse the repository at this point in the history
upgrade samtools to a more recent version

See merge request tron/tronflow-bwa-pe!8
  • Loading branch information
Pablo Riesgo Ferreiro committed Jun 14, 2021
2 parents b9b2a89 + 5590835 commit 30931fc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ Nextflow pipeline for the alignment of paired and single end FASTQ files with BW

There are two packages that are required for this pipeline. Both of this are preconfigured when using the conda or docker profiles.

- BWA 0.1.17
- samtools 0.1.19
- BWA 0.7.17
- samtools 1.12


## How to run it

Run it from GitHub as follows:
```
nextflow run tron-bioinformatics/tronflow-bwa -r v1.2.0 --input_files $input --output $output --algorithm aln --library paired -profile conda,standard
nextflow run tron-bioinformatics/tronflow-bwa --input_files $input --output $output --algorithm aln --library paired -profile conda,standard
```

Otherwise download the project and run as follows:
Expand Down
3 changes: 1 addition & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ channels:
- defaults
dependencies:
- bioconda::bwa=0.7.17
- conda-forge::ncurses=5
- bioconda::samtools=0.1.16
- bioconda::samtools=1.12
10 changes: 5 additions & 5 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ if (params.algorithm == "aln" && params.library == "paired" && !params.inception
set val("${name}"), file("${name}.bam") into sampe_output

"""
bwa sampe ${params.reference} ${sai1} ${sai2} ${fastq1} ${fastq2} | samtools view -uS - | samtools sort - ${name}
bwa sampe ${params.reference} ${sai1} ${sai2} ${fastq1} ${fastq2} | samtools view -uS - | samtools sort - > ${name}.bam
"""
}
}
Expand Down Expand Up @@ -155,7 +155,7 @@ else if (params.algorithm == "aln" && params.library == "single" && !params.inc
set val("${name}"), file("${name}.bam") into samse_output

"""
bwa samse ${params.reference} ${sai} ${fastq} | samtools view -uS - | samtools sort - ${name}
bwa samse ${params.reference} ${sai} ${fastq} | samtools view -uS - | samtools sort - > ${name}.bam
"""
}
}
Expand All @@ -177,7 +177,7 @@ else if (params.algorithm == "aln" && params.library == "paired" && params.incep
"""
bwa sampe ${params.reference} <( bwa aln -t ${params.cpus} ${params.reference} ${fastq1} ) \
<( bwa aln -t ${params.cpus} ${params.reference} ${fastq2} ) ${fastq1} ${fastq2} \
| samtools view -uS - | samtools sort - ${name}
| samtools view -uS - | samtools sort - > ${name}.bam
"""
}
}
Expand All @@ -197,7 +197,7 @@ else if (params.algorithm == "mem" && params.library == "paired") {
set val("${name}"), file("${name}.bam") into sampe_output

"""
bwa mem -t ${task.cpus} ${params.reference} ${fastq1} ${fastq2} | samtools view -uS - | samtools sort - ${name}
bwa mem -t ${task.cpus} ${params.reference} ${fastq1} ${fastq2} | samtools view -uS - | samtools sort - > ${name}.bam
"""
}
}
Expand All @@ -217,7 +217,7 @@ else if (params.algorithm == "mem" && params.library == "single") {
set val("${name}"), file("${name}.bam") into sampe_output

"""
bwa mem -t ${task.cpus} ${params.reference} ${fastq} | samtools view -uS - | samtools sort - ${name}
bwa mem -t ${task.cpus} ${params.reference} ${fastq} | samtools view -uS - | samtools sort - > ${name}.bam
"""
}
}
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ env {
process.shell = ['/bin/bash', '-euo', 'pipefail']


VERSION = "1.3.0"
VERSION = "1.4.0"

manifest {
name = 'TRON-Bioinformatics/tronflow-bwa'
Expand Down

0 comments on commit 30931fc

Please sign in to comment.