-
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 Qiime2 biom file #821
Comments
Can you share the file? |
Hi,
File attached.
…-Shrish
From: "Paul J. McMurdie" <notifications@github.com>
Reply-To: joey711/phyloseq <reply@reply.github.com>
Date: Saturday, September 16, 2017 at 7:19 PM
To: joey711/phyloseq <phyloseq@noreply.github.com>
Cc: sbudree <dr.s.budree@gmail.com>, Author <author@noreply.github.com>
Subject: Re: [joey711/phyloseq] Importing Qiime2 biom file (#821)
Can you share the file?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Actually, can you post a link? Although you've responded via email, this is actually still on the phyloseq issues tracker: so email attachments don't work. Any file-hosting site will do. Some (like dropbox) make it easy to stop sharing the file after a certain amount of time, or when you say so. |
Hi, Link to biom file: https://www.dropbox.com/s/16qsa311jn2bjkb/feature-table.biom?dl=0 |
Hi,
|
Hello, I've been having this similar issue as well. I can't use the biom convert circumvention because biom throws an error when trying to do Step 5 ViridianaAvila suggested ("TypeError: can only join an iterable", I suspect this has to do with the qiime format itself, as trying to validate the original biom file from the qiime qza returns it as an invalid file). So, I tried adding the taxonomy as a new column into the converted text file. Trying to load this into phyloseq like this:
gives me the following error:
Traceback in Rstudio shows me this:
I've attached the table I was trying to import. |
Hi, Just came across this and had the same problem. I'm able to run the "moving pictures" tutorial fine (otu_table_mc2_w_tax_no_pynast_failures.biom), but not my own data. The only difference that I can spot is that my .biom file was produced by QIIME2. |
Hi guys, the approach of @ViridianaAvila works and is the one I have been using quite often in the past. Be aware that you have to give a header to the taxonomy column in your otu_table.txt and this header should be the same name as used behind the command "obs-metadata". @ksdiaz : Your taxonomy has no column header. Name the column header for the taxonomy column in the otu_table.txt "taxonomy" when using this command:
@jme6f4 : You might want to check if you did the same mistake. Then in phyloseq simply do:
Also: The qiime2 taxonomy column header in taxonomy.tsv is "Taxon" and if only pasted to otu_table.txt is not recognized. I guess changing to "obs-metadata Taxon" should also work fine. Good luck! |
Hi everyone, I used qiime tools export to get those files except the mapfile which extension was changed from tsv to txt. After running qiimedata, i got an error: Processing map file... Does anyone know this error? Please help!!! Thank you very much, Toan |
Hello, |
hello, Do you have any clue please? |
Hi not sure if you have sorted this out, however, I was having similar problems. This may not be your issue, but it was one of mine. In your output.txt file you have quotation marks for the boundaries of each cell, and the convert function can't recognise these. Instead of writing a .txt file in R I wrote it as .csv and used sep="\t" to get rid of the quotation marks. I then opened in excel and checked the headers were aligned and saved it as a .txt file. I then opened it in notepad and pasted #Constructed from BIOM file# at the start of the txt file as this was inserted by the software after the first convert and figured it might be important. At the moment you have "#OTU ID" and when you remove the brackets the # will probably stop it reading anything after it. Mine starts with this: #Constructed from BIOM file# OTU ID Sample1 Sample2 and so on. Once I had this format sorted everything else worked fine, good luck. |
Hello! I am also having problems getting my QIIME2 data into phyloseq. So far, I tried all of the above steps, including making a new .biom file with OTU abundances + taxonomy. I had the same problem as @Nourhanelsahly, even after following the above changes from @Ajsnevets by changing the header to match the OTUID for each file. Please help! I would love to use phyloseq, and since QIIME2 is now widely used, I wish that it was a lot easier to transition from QIIME2 output to phyloseq. I really want to figure this out! See .txt file below: See code: Apart from the issue of getting a .biom file with both taxonomy and OTU abundances, I am having trouble importing my data into phyloseq. See below. Here is my mapping file: I get this error: Processing map file... |
There is no taxonomy data in this table, so I guess you didn't manage to merge them? Additionally though, the problem is that with your "table.from_biom.txt" file, the columns names are not lined up with the columns. Not sure how this got messed up. (side note) Your tables seem to have been rarefied, I am no expert but my understanding is that DESEq2 allows you to look at the data without rarefying it like with qiime2. I would go back to the original table.qza file, unzip your table.qza file and go through the folders until you found the .biom and then qiime2 convert it with: |
Hi @Ajsnevets and everyone else trying to get QIIME2 data into phyloseq... after some exporting and merging in R (to get around the fact that after filtering out chloroplasts and mitochondria, my taxonomy files and OTU matrix have a different # of taxa), I was finally able to wrangle my QIIME2 data into Phyloseq without using any .biom files. Here is a pipeline that I wrote (see PDF below). It is pretty clunky and uses QIIME2 + R + excel, but at least it works! It is also partially based on the answer from https://forum.qiime2.org/t/converting-biom-files-with-taxonomic-info-for-import-in-r-with-phyloseq/2542/5 from that doesn't use any .biom files. |
@brookeweigel |
As an update to helpful instructions posted by @brookeweigel, you can shorten these steps by formatting the taxonomy file in R using the below commands: #Read in the .tsv version of the feature table, which should now have a column header "OTUID", not "#OTU ID" #Read in the .tsv version of the taxonomy table, which should also have a column header "OTUID", not "Feature ID" #Create a list of OTUIDs that are present in tax, but not in features, which need to be eliminated and remove them #Separate the "Taxon" column in the tax_filtered data frame by semicolon so that each step of the taxonomy (e.g., kingdom, phylum, class, etc.) is its own column #write one outfile containing the OTUID and taxonomic info |
Hi guys, I am having a problem while importing QIIME2 biom file into phyloseq. So, I have my own bash script running QIIME2 analysis from raw reads to assigning taxonomy and exporting files of interest. Lastly taxonomy is added to the biom file after properly changing header of taxonomy.tsv file:
To make things short, I've been running hundreds and hundreds of samples from different projects this way pain-free. But only this one particular run gives me this "itch" with its biom file.
I have double-, triple-, quadruple-checked my path and file names, so that's not the issue... The additional warning message usually occurs when I am importing biom files, but it doesn't really affect my phyloseq workflow. So, for some reason, it seems that biom file itself could be corrupt. Anyone has an idea how to inspect the biom to check what might be wrong with it? https://drive.google.com/open?id=1n828eQmPWjfPpsURh1MH9KRMT0pi2rZl There are 4 files; 1) original non-exported biom file; 3_table.qza, 2) exported biom file; feature-table.biom, 3) biom file with added taxonomy; table-with-taxonomy.biom and 4) taxonomy.tsv file ps. when I continue using the .qza file in downstream QIIME2 analysis, it runs without a problem. Any help would be appreciated, |
Hi everyone, I am not sure that issue has been solved yet. My current way to move from Qiime2 to Phyloseq still hasn't betrayed me as of version 2019.4, so I am sharing it if somebody might find it useful. In command line I do as follows:
Once this is done, then the phyloseq object is being built by:
TBH I am planning to abandon Qiime2 and follow the Bioconductor workflow as soon as possible, but I hope this helps anybody who needs it! |
Hello @brookeweigel ! |
Sometime an error is thrown when there are duplicates in the sample names
and the program is not allowed to add rownames
that have the same value for two different rows, you only see this if you
do it step by step by hand, but this is something we see quite a lot.
Susan
…On Wed, Jul 31, 2019 at 7:54 AM Nicheca ***@***.***> wrote:
Hi @Ajsnevets <https://github.com/Ajsnevets> and everyone else trying to
get QIIME2 data into phyloseq... after some exporting and merging in R (to
get around the fact that after filtering out chloroplasts and mitochondria,
my taxonomy files and OTU matrix have a different # of taxa), I was finally
able to wrangle my QIIME2 data into Phyloseq without using any .biom files.
Here is a pipeline that I wrote (see PDF below). It is pretty clunky and
uses QIIME2 + R + excel, but at least it works!
It is also partially based on the answer from
https://forum.qiime2.org/t/converting-biom-files-with-taxonomic-info-for-import-in-r-with-phyloseq/2542/5
from that doesn't use any .biom files.
QIIME2_to_Phyloseq.pdf
<https://github.com/joey711/phyloseq/files/1795523/QIIME2_to_Phyloseq.pdf>
QIIME2_to_Phyloseq.pdf
Hello @brookeweigel <https://github.com/brookeweigel> !
Many thanks for sharing your code! I am struggling with the
sample_names(TAX) that return as NULL whereas my sample_name(OTU) includes
my samples names. I do not know where my mistake could come from.
Any idea?
Thanks in advance!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#821?email_source=notifications&email_token=AAJFZPIECUIL2AKR5P6WGFLQCGRQ7A5CNFSM4D3HTSVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3HQSIY#issuecomment-516884771>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJFZPJ3Q72DYIYRHO3TFWDQCGRQ7ANCNFSM4D3HTSVA>
.
--
Susan Holmes
John Henry Samter Fellow in Undergraduate Education
Professor, Statistics
2017-2018 CASBS Fellow,
Sequoia Hall,
390 Serra Mall
Stanford, CA 94305
http://www-stat.stanford.edu/~susan/
|
Hi,
I have created a feature table using Qiime2 and have exported this as a biom file. However, this biom file cannot be imported into phyloseq [Error in
colnames<-
(*tmp*
, value = c("ta1", "ta0")) :length of 'dimnames' [2] not equal to array extent
In addition: There were 50 or more warnings (use warnings() to see the first 50)]
Can you advise me on how to import the Qiime2 biom file into Phloseq?
The text was updated successfully, but these errors were encountered: