Skip to content

Commit cf74a20

Browse files
committed
dadaist2 0.1.05
1 parent 0e1d653 commit cf74a20

File tree

3 files changed

+67
-12
lines changed

3 files changed

+67
-12
lines changed

bin/dadaist2

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use Digest::MD5 qw(md5_hex);
1717
use File::Temp;
1818

1919
my $PROGRAM = basename($0);
20-
my $VERSION = '0.1.04';
20+
my $VERSION = '0.1.07';
2121
my $opt_verbose = 0;
2222
my $opt_debug = 0;
2323
my $opt_id_separator = '_';
@@ -208,6 +208,9 @@ my @dada_paired_args = (
208208
# Special values: 0 - Use all input reads.
209209
# Ex: 1000000
210210
$dada2_min_reads,
211+
212+
# 18) base dir,
213+
${temp_dir}
211214
);
212215

213216

@@ -224,7 +227,7 @@ if ( $dada2_execution->{'exit'} != 0 ) {
224227
copy(File::Spec->catfile($dada2_temp, 'stats.tsv'),
225228
File::Spec->catfile($opt_output_directory, 'dada2_stats.tsv')) || die " ERROR:\n Unable to copy stats.tsv file from $dada2_temp to $opt_output_directory.\n";
226229

227-
my $dada2_tsv = File::Spec->catfile($dada2_temp, 'dada2.tsv');
230+
my $dada2_tsv = File::Spec->catfile($dada2_temp, 'dada2.tsv');
228231
my $dada2_file = File::Spec->catfile($opt_output_directory, 'feature-table.tsv');
229232
my $repseq_file = File::Spec->catfile($opt_output_directory, 'rep-seqs.fasta');
230233

bin/run_dada_paired.R

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,24 +107,24 @@ getN <- function(x) sum(getUniques(x))
107107
args <- commandArgs(TRUE)
108108

109109
# Assign each of the arguments, in positional order, to an appropriately named R variable
110-
inp.dirF <- args[[1]]
111-
inp.dirR <- args[[2]]
112-
out.path <- args[[3]]
110+
inp.dirF <- args[[1]]
111+
inp.dirR <- args[[2]]
112+
out.path <- args[[3]]
113113
out.track <- args[[4]]
114114
filtered.dirF <- args[[5]]
115115
filtered.dirR <- args[[6]]
116116
truncLenF <- as.integer(args[[7]])
117117
truncLenR <- as.integer(args[[8]])
118118
trimLeftF <- as.integer(args[[9]])
119119
trimLeftR <- as.integer(args[[10]])
120-
maxEEF <- as.numeric(args[[11]])
121-
maxEER <- as.numeric(args[[12]])
122-
truncQ <- as.integer(args[[13]])
120+
maxEEF <- as.numeric(args[[11]])
121+
maxEER <- as.numeric(args[[12]])
122+
truncQ <- as.integer(args[[13]])
123123
chimeraMethod <- args[[14]]
124124
minParentFold <- as.numeric(args[[15]])
125-
nthreads <- as.integer(args[[16]])
126-
nreads.learn <- as.integer(args[[17]])
127-
125+
nthreads <- as.integer(args[[16]])
126+
nreads.learn <- as.integer(args[[17]])
127+
outbasepath <- args[[18]]
128128
### VALIDATE ARGUMENTS ###
129129

130130
# Input directory is expected to contain .fastq.gz file(s)
@@ -178,6 +178,15 @@ cat("DADA2:", as.character(packageVersion("dada2")), "/",
178178
cat("1) Filtering ")
179179
filtsF <- file.path(filtered.dirF, basename(unfiltsF))
180180
filtsR <- file.path(filtered.dirR, basename(unfiltsR))
181+
182+
for (p in c(filtsF,filtsR)) {
183+
png(cat(outbasepath,"/",basename(p),".png"));
184+
plotQualityProfile(p)
185+
dev.off()
186+
}
187+
188+
189+
181190
out <- suppressWarnings(filterAndTrim(unfiltsF, filtsF, unfiltsR, filtsR,
182191
truncLen=c(truncLenF, truncLenR), trimLeft=c(trimLeftF, trimLeftR),
183192
maxEE=c(maxEEF, maxEER), truncQ=truncQ, rm.phix=TRUE,
@@ -242,6 +251,6 @@ col.names <- basename(filtsF)
242251
col.names[[1]] <- paste0("#OTU ID\t", col.names[[1]])
243252
write.table(seqtab.nochim, out.path, sep="\t",
244253
row.names=TRUE, col.names=col.names, quote=FALSE)
245-
saveRDS(seqtab.nochim, gsub("tsv", "rds", out.path)) ### TESTING
254+
#saveRDS(seqtab.nochim, gsub("tsv", "rds", out.path)) ### TESTING
246255

247256
q(status=0)

meta.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{% set name = "dadaist2" %}
2+
{% set version = "0.1.03" %}
3+
{% set sha256 = "068a591b9736a3a46f60e4a5af3c40d0c769e8d3b68bc6aa708d17213a876e8d" %}
4+
{% set user = "quadram-institute-bioscience" %}
5+
6+
package:
7+
name: '{{ name }}'
8+
version: '{{ version }}'
9+
10+
source:
11+
url: 'https://github.com/{{ user }}/{{ name }}/archive/v{{ version }}.tar.gz'
12+
sha256: '{{ sha256 }}'
13+
14+
build:
15+
number: 0
16+
noarch: generic
17+
18+
requirements:
19+
run:
20+
- perl
21+
- perl-fastx-reader >=0.90
22+
- vsearch
23+
- bioconductor-dada2
24+
- fastp
25+
- clustalo
26+
- fasttree
27+
- sdm
28+
- lca
29+
- rtk
30+
- blast
31+
32+
test:
33+
commands:
34+
- dadaist2 --version 2>&1 | grep -F '{{ version }}'
35+
36+
37+
about:
38+
home: 'https://github.com/{{ user }}/{{ name }}'
39+
license: MIT
40+
summary: Command line wrapper to run DADA2 on a set of paired-end reads
41+
description: Command line wrapper to run DADA2 on a set of paired-end reads
42+
43+

0 commit comments

Comments
 (0)