-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing picrust output biom files in phyloseq #720
Comments
Hi Wasim and Joey, Any update on this? I'm trying to do the same. |
@carlyrae @wasimbt Haven't done this myself but here's a comment roughly outlining how to do this. It's a rough overview but seems to do what you're asking for. |
Hi CarlyRae, Below is how i did, ##downloaded biomformat package ##This is normal error message ignore (no taxonomy added) ##Add taxonomy ##Now import mapping file ##Merge all three files Aj_f_path3 It should work for you too, Cheers! |
Hi,
When i checked my biom file summary, it read as
x
biom object.
type: Gene table
matrix_type: sparse
328 rows and 251 columns
It could be related to issue of biom table (version?) as you can see
my biom table is sparse and your is dense.
Also instead of OTU table you should be having genetable after picrust
prediction?
If it does not help, you could send me your file and i will have a quick look.
Best!
…On Fri, Nov 3, 2017 at 7:43 PM, Carly Muletz Wolz ***@***.***> wrote:
Finally getting around to doing this!
When I try to follow your steps, I get stuck at the beginning. Now, I
don't have either the ko or pathway predictions ranked at a specific level
so maybe that is part of the problem....
This is what I get
y <- read_biom("pathway_predictions.biom")
Warning message:
In strsplit(msg, "\n") : input string 1 is invalid in this locale
pathway <- import_biom (y)
Error in dimnames(x) <- dn :
length of 'dimnames' [2] not equal to array extent
In addition: There were 50 or more warnings (use warnings() to see the
first 50)
y
biom object.
type: OTU table
matrix_type: dense
328 rows and 434 columns
x = read_biom("ko_predictions.biom")
Warning message:
In strsplit(msg, "\n") : input string 1 is invalid in this locale
x
biom object.
type: OTU table
matrix_type: dense
6909 rows and 434 columns
y <- read_biom("pathway_predictions.biom")
Warning message:
In strsplit(msg, "\n") : input string 1 is invalid in this locale
y
biom object.
type: OTU table
matrix_type: dense
328 rows and 434 columns
ko <-import_biom (x)
Error in dimnames(x) <- dn :
length of 'dimnames' [2] not equal to array extent
In addition: There were 50 or more warnings (use warnings() to see the
first 50)
pathway <- import_biom (y)
Error in dimnames(x) <- dn :
length of 'dimnames' [2] not equal to array extent
In addition: There were 50 or more warnings (use warnings() to see the
first 50)
Neither the ko or pathway files result in any files coming into R. I have
biomformat and phyloseq libraries loaded. But both x and y result in
files...
Any thoughts?
Thanks!
Carly
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#720 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFH0zpsVH6StNL6KJpRUBtg_BNbeYpUqks5sy17YgaJpZM4MPdVE>
.
--
Wasimuddin, PhD
Institute of Evolutionary Ecology
and Conservation Genomics
University of Ulm
Albert-Einstein Allee 11
D-89069 Ulm, Germany
https://www.uni-ulm.de/en/nawi/bio3/prof-dr-simone-sommer/academic-staff-and-postdocs/dr-wasimuddin.html
|
Thanks for the reply and help with this. I was actually able to get it to work now. I was having issues with the import_biom call, but it appears that I did not need it. Read in file created in picrusty <- read_biom("pathway_predictions.biom") Read in my mapping filemap <- import_qiime_sample_data("Mapping_Ch3_final_selDays.txt") Add taxonomy to yotumaty = as(biom_data(y), "matrix") Merge all three filespath_1 = phyloseq(OTUy, TAXy, map) Following Bletz et al. 2016: Pathways with < 10 counts were removed from the table.path_2 = filter_taxa(path_1, function(x) sum(x) > 10, TRUE) Let's rarefy and see if that helps the issues with betaYes, need to rarefy for this, otherwise beta differences are driven by differences in sampling depthmin_lib <- min(sample_sums(path_2)) Thanks!! |
Glad that it worked for you. Yes, I also prefer rarefying the data for
diversity estimation.
All the best for your analysis!
Cheers!
Wasim
…On Mon, Nov 6, 2017 at 3:13 PM, Carly Muletz Wolz ***@***.***> wrote:
Thanks for the reply and help with this. I was actually able to get it to
work now. I was having issues with the import_biom call, but it appears
that I did not need it.
y <- read_biom("pathway_predictions.biom")
y
map <- import_qiime_sample_data("Mapping_Ch3_final_selDays.txt")
Add taxonomy to y
otumaty = as(biom_data(y), "matrix")
OTUy = otu_table(otumaty, taxa_are_rows=TRUE)
taxmaty = as.matrix(observation_metadata(y), rownames.force=TRUE)
TAXy = tax_table(taxmaty)
TAXy
Merge all three files
path_1 = phyloseq(OTUy, TAXy, map)
path_1
Following Bletz et al. 2016: Pathways with < 10 counts were removed from
the table.
path_2 = filter_taxa(path_1, function(x) sum(x) > 10, TRUE)
Let's rarefy and see if that helps the issues with beta Yes, need to
rarefy for this, otherwise beta differences are driven by differences in
sampling depth
min_lib <- min(sample_sums(path_2))
set.seed(4)
path_2 <- rarefy_even_depth(path_2, sample.size = min_lib, verbose = T,
replace = TRUE)
Thanks!!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#720 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFH0zpOIS-__rYi9Elt5IJtln85z7PYWks5szxQcgaJpZM4MPdVE>
.
--
Wasimuddin, PhD
Institute of Evolutionary Ecology
and Conservation Genomics
University of Ulm
Albert-Einstein Allee 11
D-89069 Ulm, Germany
https://www.uni-ulm.de/en/nawi/bio3/prof-dr-simone-sommer/academic-staff-and-postdocs/dr-wasimuddin.html
|
Dear Joey!
So far I have done all my microbiome analysis on phyloseq. For the last analysis, is there any way to import picrust created biom files into phyloseq?
Thanks in advance!
Wasim
The text was updated successfully, but these errors were encountered: