annotate test-data/gentest.R @ 0:fd892c845981 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
author iuc
date Fri, 08 Nov 2019 18:49:30 -0500
parents
children c48d42d65d2b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
1 library(dada2, quietly=T)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
2 library(ggplot2, quietly=T)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
3
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
4 fwd <- c('F3D0_S188_L001_R1_001.fastq.gz')
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
5 rev <- c('F3D0_S188_L001_R2_001.fastq.gz')
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
6
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
7 sample.names <- c('F3D0_S188_L001')
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
8
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
9 names(fwd) <- sample.names
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
10 names(rev) <- sample.names
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
11
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
12
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
13 filt.fwd <- c('filterAndTrim_F3D0_R1.fq.gz')
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
14 filt.rev <- c('filterAndTrim_F3D0_R2.fq.gz')
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
15
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
16 ftout <- filterAndTrim(fwd, filt.fwd, rev, filt.rev)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
17
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
18 # In the test no name can be given to the collection
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
19 rownames(ftout) <- c( 'Unnamed Collection' )
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
20 write.table(ftout, "filterAndTrim_F3D0.tab", quote=F, sep="\t", col.names=NA)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
21
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
22 # Plot quality profile (just for one file, Galaxy compares with sim_size)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
23
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
24 qp <- plotQualityProfile(fwd)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
25 ggsave('qualityProfile.pdf', qp, width = 20,height = 15,units = c("cm"))
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
26
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
27 # Plot complexity (just for one file, Galaxy compares with sim_size)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
28
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
29 cp <- plotComplexity(fwd)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
30 ggsave('complexity.pdf', cp, width = 20,height = 15,units = c("cm"))
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
31
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
32
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
33 # learn Errors
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
34 err.fwd <- learnErrors(filt.fwd)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
35 saveRDS(err.fwd, file='learnErrors_F3D0_R1.Rdata')
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
36 plot <- plotErrors(err.fwd)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
37 ggsave('learnErrors_F3D0_R1.pdf', plot, width = 20,height = 15,units = c("cm"))
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
38
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
39 err.rev <- learnErrors(filt.fwd)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
40 saveRDS(err.rev, file='learnErrors_F3D0_R2.Rdata')
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
41 plot <- plotErrors(err.rev)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
42 ggsave('learnErrors_F3D0_R2.pdf', plot, width = 20,height = 15,units = c("cm"))
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
43
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
44 # dada
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
45 dada.fwd <- dada(filt.fwd, err.fwd)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
46 saveRDS(dada.fwd, file="dada_F3D0_R1.Rdata")
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
47 dada.rev <- dada(filt.rev, err.rev)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
48 saveRDS(dada.rev, file="dada_F3D0_R2.Rdata")
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
49
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
50 # merge pairs
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
51 merged <- mergePairs(dada.fwd, filt.fwd, dada.rev, filt.rev)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
52 saveRDS(merged, file='mergePairs_F3D0.Rdata')
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
53
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
54 # make sequence table
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
55 seqtab <- makeSequenceTable(merged)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
56 write.table(t(seqtab), file="makeSequenceTable_F3D0.tab", quote=F, sep="\t", row.names = T, col.names = NA)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
57
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
58 reads.per.seqlen <- tapply(colSums(seqtab), factor(nchar(getSequences(seqtab))), sum)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
59 df <- data.frame(length=as.numeric(names(reads.per.seqlen)), count=reads.per.seqlen)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
60 pdf( 'makeSequenceTable_F3D0.pdf' )
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
61 ggplot(data=df, aes(x=length, y=count)) +
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
62 geom_col() +
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
63 theme_bw()
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
64 bequiet <- dev.off()
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
65
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
66 # remove bimera
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
67 seqtab.nochim <- removeBimeraDenovo(seqtab)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
68 write.table(t(seqtab), file="removeBimeraDenovo_F3D0.tab", quote=F, sep="\t", row.names = T, col.names = NA)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
69
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
70 # assign taxonomy/species
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
71 tl <- 'Level1,Level2,Level3,Level4,Level5'
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
72 tl <- strsplit(tl, ",")[[1]]
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
73
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
74 taxa <- assignTaxonomy(seqtab.nochim, 'reference.fa', outputBootstraps = T, taxLevels=c('Level1','Level2','Level3','Level4','Level5'))
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
75
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
76 taxa$tax <- addSpecies(taxa$tax, 'reference_species.fa')
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
77 write.table(taxa$tax, file = 'assignTaxonomyAddspecies_F3D0.tab', quote = F, sep = "\t", row.names = T, col.names = NA)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
78
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
79 write.table(taxa$boot, file = 'assignTaxonomyAddspecies_F3D0_boot.tab', quote = F, sep = "\t", row.names = T, col.names = NA)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
80
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
81
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
82
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
83 ## Generate extra test data for parameter testing
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
84
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
85 filterAndTrim(fwd, c('filterAndTrim_single_F3D0_R1.fq.gz'), rm.phix = T, orient.fwd = 'TACGG')
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
86
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
87 filterAndTrim(fwd, c('filterAndTrim_single_trimmers_F3D0_R1.fq.gz'), truncQ = 30, truncLen = 2, trimLeft = 150, trimRight = 2)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
88
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
89 filterAndTrim(fwd, c('filterAndTrim_single_filters_F3D0_R1.fq.gz'), maxLen = 255, minLen = 60, maxN = 100, minQ = 13, maxEE = 1)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
90
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
91
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
92 merged_nondef <- mergePairs(dada.fwd, filt.fwd, dada.rev, filt.rev, minOverlap = 8, maxMismatch = 1, justConcatenate = TRUE, trimOverhang = TRUE)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
93 saveRDS(merged_nondef, file='mergePairs_F3D0_nondefault.Rdata')
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
94
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
95 rb.dada.fwd <- removeBimeraDenovo(dada.fwd)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
96 write.table(rb.dada.fwd, file = 'removeBimeraDenovo_F3D0_dada_uniques.tab', quote = F, sep = "\t", row.names = T, col.names = F)
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
97
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
98 rb.merged <- removeBimeraDenovo(merged, method="pooled")
fd892c845981 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f8b6b6e72914ad6bcca8423dfa03f59bde80992e"
iuc
parents:
diff changeset
99 saveRDS(rb.merged, file='removeBimeraDenovo_F3D0_mergepairs.Rdata')