Skip to content

Commit 1c7ca8e

Browse files
authored
Merge pull request #11 from NorwegianVeterinaryInstitute/dev_filter_contig
Dev filter contig - fixing small bugs in main
2 parents 6c2ae23 + 42a52ed commit 1c7ca8e

5 files changed

Lines changed: 19 additions & 27 deletions

File tree

SAGA/run_filter_contigs.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
# Run filter_contigs track on SAGA
3+
# Usage: bash SAGA/run_filter_contigs.sh
4+
5+
nextflow run main.nf \
6+
-c SAGA/saga_sapro.config \
7+
-profile apptainer \
8+
--track filter_contigs \
9+
--input samples.csv \
10+
--out_dir results \
11+
--blastDB /cluster/shared/databases/blast/nt \
12+
--ranked_taxo_file /path/to/ranked_taxo.tsv \
13+
--positive_filter "Oomycetes"

conf/modules_varwrrum.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ process {
153153

154154

155155
// PREP SAMPLES POP
156-
withName: ' VARWRRUM:VAR_PREP_SAMPLES:SAMTOOLS_MERGE_BAMS|VARWRRUM:VAR_PREP_SAMPLES:SAMTOOLS_COORDSORT_INDEX' {
156+
withName: 'VARWRRUM:VAR_PREP_SAMPLES:SAMTOOLS_MERGE_BAMS|VARWRRUM:VAR_PREP_SAMPLES:SAMTOOLS_COORDSORT_INDEX' {
157157
publishDir = [
158158
[
159159
path: { "${params.out_dir}/versions" },

modules/BWAMEM.nf

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -53,26 +53,3 @@ process BWAMEM_VAR {
5353
// [W::sam_hdr_link_pg] PG line with ID:samtools-5D89A8C2 has a PP link to missing program 'bwa'
5454

5555

56-
// Need to find the way to write better
57-
process BWAMEM_VAR {
58-
conda (params.enable_conda ? 'bioconda::bwa=0.7.8' : null)
59-
container 'quay.io/biocontainers/bwa:0.7.8--he4a0461_9'
60-
61-
label 'process_high'
62-
63-
tag "$ID"
64-
65-
input:
66-
tuple val(ID), path(R1), path(R2), path(assembly)
67-
68-
output:
69-
tuple val(ID), path("*_map1.sam"), emit: shortbam_ch // will need to remove this one - in compass
70-
tuple val(ID), path("*_map1.sam"), emit: sam // check actually is not supposed to be compressed
71-
72-
script:
73-
threads = task.cpus * 2
74-
"""
75-
bwa index $assembly
76-
bwa mem -t $threads -v 0 -R '@RG\tID:${ID}\tSM:${ID}' $params.bwamem_args $assembly $R1 $R2 > ${ID}_map1.sam
77-
"""
78-
}

nextflow.config

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ params {
1111
// ID(name),assembly (path),longreads(path),R1(path),R2(path),type(assembly),comments(for you in case)
1212
// options type: short, long, hybrid
1313

14-
input = null
14+
input = null
15+
out_dir = "results"
1516

1617

1718
// TRACK Choice : purely_raw (not done), tryssembly (not done), filter_contigs, coverage, haplopurge, varwrrum
@@ -160,9 +161,10 @@ params {
160161
// Profiles
161162
includeConfig 'conf/profiles.config'
162163

163-
// Modules
164+
// Modules
164165
includeConfig 'conf/base.config'
165166
// I had to split the modules config - was unpractical
167+
includeConfig 'conf/modules_filter_contigs.config'
166168
includeConfig 'conf/modules_compass.config'
167169
includeConfig 'conf/modules_varwrrum.config'
168170

workflows/FILTER_CONTIGS.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ workflow FILTER_CONTIGS {
66
input_ch = Channel
77
.fromPath(params.input, checkIfExists: true)
88
.splitCsv(header:['ID', 'assembly'], skip: 1, sep:",", strip:true)
9-
.map { row -> (ID, assembly) = [row.ID, row.assembly]}
9+
.map { row -> tuple(row.ID, file(row.assembly)) }
1010

1111
FILTER_CONTIGS_SUB(input_ch)
1212

0 commit comments

Comments
 (0)