Less reads are shown using sample_sums() through phyloseq
0
0
Entering edit mode
22 months ago
梓明 ▴ 10

Hi all,

I'm currently working on the phyloseq and vegan to generate a rarecurve.

However, when I use the command sample_sums() in R, it show less reads (293681) than the report from kraken2 report (394581). 394581 is the number of reads covered by the clade rooted at cellular organisms (also root). The number of reads assigned directly to cellular organisms (also root) is 9818.

Can you guys explain why this happened? Or if there are something wrong with the command I used?

Here are the command lines I used to generate the rarecurve:

Bash:
# Generate a biom file.
kraken-biom samq8.report -o sam.biom --fmt json

R:
# Point to the working directory
setwd("~/biomfile")

# Create the phyloseq object with the import_biom command
sam8 <- import_biom("samq8.report")

sam8@tax_table@.Data <- substring(sam8@tax_table@.Data, 4)

colnames(sam8@tax_table@.Data)<- c("Kingdom", "Phylum", "Class", "Order", "Family", "Genus", "Species")

# Count the reads
sample_sums(sam8)
vegan Phyloseq and • 528 views
ADD COMMENT
0
Entering edit mode

Please use markdown to highlight your code. Either select code and then use that 10101 button or use the markdown backticks, like:

```bash
echo 123
```

```r
for(i in 1:10) message(i)
```
ADD REPLY
1
Entering edit mode

This is the first time I've used Biostars for question posting. Anyway, thanks for your suggestion and I've changed the code highlighted.

ADD REPLY

Login before adding your answer.

Traffic: 2389 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6