Updated Practical 3 Processing 16S rRNA amplicon data (markdown) authored by Ben Francis's avatar Ben Francis
......@@ -114,9 +114,9 @@ Start by getting the full processed dada data:
$ cp /bioinf/home/tfrancis/marmic_NGS2020/16S_amplicons/demultiplexed/seqtab_final.rds .
$ cp /bioinf/home/tfrancis/marmic_NGS2020/16S_amplicons/demultiplexed/taxa_final.rds .
Then start R (any R, doesn't matter this time)
Then R
$ R
$ /home/tfrancis/R-3.6.2/bin/R
load the data:
......@@ -159,13 +159,13 @@ then do the plotting :)
theme(axis.text.x=element_text(angle=45, hjust=1))
}
plotTaxon(seqtab.nochim, taxa, "Bacteroidetes", 0.01, "Genus")
# Ignore this bit about making pdfs
So the bit above creates the function called `plotTaxon()`, which we can then use to generate the plots. We're going to create a pdf of the plot by first opening a pdf file with the `pdf()` command, then run the `plotTaxon()` function, then switch off the plotting device.
> pdf("Marmic-amplicon-plot.pdf")
>
> plotTaxon(seqtab.nochim, taxa, "Bacteroidetes", 0.01, "Genus")
> dev.off()
Once you have your plot, you can open a new terminal (don't quit R because we will want to create different plots for different taxa - just change the file name for the pdf) and run:
......
......