... | @@ -28,7 +28,7 @@ What are fnFs and fnRs? Think about why we might want to make lists of files. (R |
... | @@ -28,7 +28,7 @@ What are fnFs and fnRs? Think about why we might want to make lists of files. (R |
|
|
|
|
|
> sample.names <- sapply(strsplit(basename(fnFs), ".R"), `[`, 1)
|
|
> sample.names <- sapply(strsplit(basename(fnFs), ".R"), `[`, 1)
|
|
|
|
|
|
This one's a bit funny syntactically. Use the ? to try and figure out what sapply does. The oddest bit is that single square bracket '['. In R, the square bracket is actually a function much like '+' and '-'! It's actually the subset function here.
|
|
This one's a bit funny syntactically. Use the `?` to try and figure out what sapply does. The oddest bit is that single square bracket `[`. In R, the square bracket is actually a function much like `+` and `-`! It's actually the subset function here.
|
|
|
|
|
|
Now we have our file names, we can look at the quality values of the reads:
|
|
Now we have our file names, we can look at the quality values of the reads:
|
|
|
|
|
... | @@ -44,7 +44,7 @@ Next we want to make file paths for the filtering and trimming step that will be |
... | @@ -44,7 +44,7 @@ Next we want to make file paths for the filtering and trimming step that will be |
|
> names(filtRs) <- sample.names
|
|
> names(filtRs) <- sample.names
|
|
|
|
|
|
|
|
|
|
Now we move on to actually filtering and quality trimming our reads. Again use ? to see what filterAndTrim does, and what the various options are here.
|
|
Now we move on to actually filtering and quality trimming our reads. Again use `?` to see what filterAndTrim does, and what the various options are here.
|
|
|
|
|
|
> out <- filterAndTrim(fnFs, filtFs, fnRs, filtRs, maxN=0, maxEE=c(5,5), compress=TRUE, multithread=8)
|
|
> out <- filterAndTrim(fnFs, filtFs, fnRs, filtRs, maxN=0, maxEE=c(5,5), compress=TRUE, multithread=8)
|
|
|
|
|
... | @@ -73,7 +73,7 @@ Next we merge the reads to produce single sequence variants: |
... | @@ -73,7 +73,7 @@ Next we merge the reads to produce single sequence variants: |
|
|
|
|
|
> mergers <- mergePairs(dadaFs, filtFs, dadaRs, filtRs, verbose=TRUE)
|
|
> mergers <- mergePairs(dadaFs, filtFs, dadaRs, filtRs, verbose=TRUE)
|
|
|
|
|
|
Be careful inspecting this object, it's really big! Have a go at subsetting it using square brackets and use head() to inspect just a part of the output.
|
|
Be careful inspecting this object, it's really big! Have a go at subsetting it using square brackets and use `head()` to inspect just a part of the output.
|
|
|
|
|
|
The next step is to make the ASV table (formatted like a standard OTU table with sequences and counts across samples):
|
|
The next step is to make the ASV table (formatted like a standard OTU table with sequences and counts across samples):
|
|
|
|
|
... | | ... | |