{"action":"created","issue":{"url":"https://api.github.com/repos/benjjneb/dada2/issues/119","repository_url":"https://api.github.com/repos/benjjneb/dada2","labels_url":"https://api.github.com/repos/benjjneb/dada2/issues/119/labels{/name}","comments_url":"https://api.github.com/repos/benjjneb/dada2/issues/119/comments","events_url":"https://api.github.com/repos/benjjneb/dada2/issues/119/events","html_url":"https://github.com/benjjneb/dada2/issues/119","id":176983971,"number":119,"title":"error when running dada on a single sample","user":{"login":"jennomics","id":3781323,"avatar_url":"https://avatars.githubusercontent.com/u/3781323?v=3","gravatar_id":"","url":"https://api.github.com/users/jennomics","html_url":"https://github.com/jennomics","followers_url":"https://api.github.com/users/jennomics/followers","following_url":"https://api.github.com/users/jennomics/following{/other_user}","gists_url":"https://api.github.com/users/jennomics/gists{/gist_id}","starred_url":"https://api.github.com/users/jennomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jennomics/subscriptions","organizations_url":"https://api.github.com/users/jennomics/orgs","repos_url":"https://api.github.com/users/jennomics/repos","events_url":"https://api.github.com/users/jennomics/events{/privacy}","received_events_url":"https://api.github.com/users/jennomics/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-14T18:29:09Z","updated_at":"2016-09-26T19:21:55Z","closed_at":"2016-09-26T19:21:55Z","body":"Hello, I'm following the dada2 tutorial here:\r\nhttp://benjjneb.github.io/dada2/tutorial.html\r\n\r\nIf I read in 2 samples from the input directory, all goes well, but if I only read in a single sample, I get stuck at this step, with this error:\r\n\r\n> dadaFs <- dada(derepFs, err=inflateErr(tperr1,3), selfConsist = TRUE, multithread=TRUE)\r\nError in dada(derepFs, err = inflateErr(tperr1, 3), selfConsist = TRUE,  : \r\n  Invalid derep$uniques vector. Must be integer valued.\r\n\r\nI'm running dada2 v. 1.1.6 on Illumina MiSeq data\r\n\r\nCode is pasted below. Thank you!\r\nJenna\r\n\r\nsource(\"https://bioconductor.org/biocLite.R\")\r\nbiocLite(\"devtools\")\r\nlibrary(\"devtools\")\r\ndevtools::install_github(\"benjjneb/dada2\")\r\nlibrary(dada2)\r\nlibrary(ShortRead)\r\n\r\ninpath <- \"/home/ubuntu/data/qc/Run27/\"\r\nfns <- list.files(inpath)\r\nfns\r\n\r\n#First read in the file names for a pair of fastq files and do a little string manipulation to get lists of the forward and reverse fastq files in matched order\r\n\r\n#reading in one sample:\r\nfastqs <- fns[grepl(\"Run27_70\", fns)]\r\nfnFs <- fastqs[grepl(\"_R1_\", fastqs)] # Just the forward read file\r\nfnRs <- fastqs[grepl(\"_R2_\", fastqs)] # Just the reverse read file\r\n# Get sample names from the first part of the forward read filename\r\nsample.names <- sapply(strsplit(fnFs, \"_\"), `[`, 2)\r\n# Fully specify the path for the fnFs and fnRs\r\nfnFs <- paste0(inpath, fnFs)\r\nfnRs <- paste0(inpath, fnRs)\r\n\r\noutpath <- \"/home/ubuntu/Run27/\"\r\n# Make filenames for the filtered fastq files\r\nfiltFs <- paste0(outpath, sample.names, \"_F_filt.fastq.gz\")\r\nfiltRs <- paste0(outpath, sample.names, \"_R_filt.fastq.gz\")\r\nsaveRDS(filtFs, \"/home/ubuntu/Run27/filtFs.rds\")\r\nsaveRDS(filtRs, \"/home/ubuntu/Run27/filtRs.rds\")\r\n\r\n# Filter \r\nfor(i in seq_along(fnFs)) {\r\n  fastqPairedFilter(c(fnFs[i], fnRs[i]), c(filtFs[i], filtRs[i]),\r\n                    trimLeft=c(25, 25), truncLen=c(250,220), \r\n                    maxN=0, maxEE=2, truncQ=2, \r\n                    compress=TRUE, verbose=TRUE)\r\n}\r\n\r\n#Dereplicate the filtered fastq files:\r\n\r\nderepFs <- derepFastq(filtFs, verbose=TRUE)\r\nderepRs <- derepFastq(filtRs, verbose=TRUE)\r\n\r\n# Name the derep-class objects by the sample names\r\nnames(derepFs) <- sample.names\r\nnames(derepRs) <- sample.names\r\nsaveRDS(derepFs, \"/home/ubuntu/Run27/derepFs.rds\")\r\nsaveRDS(derepRs, \"/home/ubuntu/Run27/derepRs.rds\")\r\n\r\n#Perform joint sample inference and error rate estimation\r\n\r\ndadaFs <- dada(derepFs, err=inflateErr(tperr1,3), selfConsist = TRUE, multithread=TRUE)\r\nsaveRDS(dadaFs, \"/home/ubuntu/Run27/dadaFs.rds\")\r\ndadaRs <- dada(derepRs, err=inflateErr(tperr1,3), selfConsist = TRUE, multithread=TRUE)\r\nsaveRDS(dadaRs, \"/home/ubuntu/Run27/dadaRs.rds\")\r\n\r\n#merge reads, adding 10Ns to concatenate when they do not overlap\r\nmergers <- mergePairs(dadaFs, derepFs, dadaRs, derepRs, justConcatenate=TRUE, verbose=TRUE)\r\n\r\n#make sequence table\r\nseqtab <- makeSequenceTable(mergers[names(mergers)])\r\n\r\n#remove chimeras\r\nseqtab.nochim <- removeBimeraDenovo(seqtab, verbose=TRUE, multithread=TRUE)\r\n\r\n#save the R object\r\nsaveRDS(seqtab.nochim, \"/home/ubuntu/Run27/seqtab.nochim.rds\")\r\n#then, to open in a new R session: \r\n#seqtab <- readRDS(\"/home/ubuntu/Run27/seqtab.nochim.rds\")"},"comment":{"url":"https://api.github.com/repos/benjjneb/dada2/issues/comments/249670309","html_url":"https://github.com/benjjneb/dada2/issues/119#issuecomment-249670309","issue_url":"https://api.github.com/repos/benjjneb/dada2/issues/119","id":249670309,"user":{"login":"benjjneb","id":5797204,"avatar_url":"https://avatars.githubusercontent.com/u/5797204?v=3","gravatar_id":"","url":"https://api.github.com/users/benjjneb","html_url":"https://github.com/benjjneb","followers_url":"https://api.github.com/users/benjjneb/followers","following_url":"https://api.github.com/users/benjjneb/following{/other_user}","gists_url":"https://api.github.com/users/benjjneb/gists{/gist_id}","starred_url":"https://api.github.com/users/benjjneb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjjneb/subscriptions","organizations_url":"https://api.github.com/users/benjjneb/orgs","repos_url":"https://api.github.com/users/benjjneb/repos","events_url":"https://api.github.com/users/benjjneb/events{/privacy}","received_events_url":"https://api.github.com/users/benjjneb/received_events","type":"User","site_admin":false},"created_at":"2016-09-26T19:21:55Z","updated_at":"2016-09-26T19:21:55Z","body":"As of 1b6d245 the names of `derep-class` and `dada-class` objects can no longer be reassigned. When running the offending single-sample code, a warning will be produced when trying to assign names, but the rest of the code will run as expected."}}
{"actor":{"display_login":"benjjneb"}}