SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
DESeq2 error : the model matrix is not full rank NicoBxl Bioinformatics 9 03-14-2017 07:10 AM
DESeq2: bad experimental design and "not full rank" problems Erinyes Bioinformatics 2 09-15-2015 02:40 AM
OTU from Qiime biom file not showing up in Megan tree? khoojj Bioinformatics 0 01-06-2015 05:11 PM
Question about Qiime otu picking illuminaGA Bioinformatics 0 01-06-2015 10:08 AM
What tools can I use to assign taxonomic rank to megablast outputs? Bilgenur Bioinformatics 1 07-22-2014 05:26 AM

Reply
 
Thread Tools
Old 01-10-2017, 09:15 AM   #1
sarah_27_m
Junior Member
 
Location: London

Join Date: Jan 2017
Posts: 4
Red face Using DeSeq2 in R or Qiime to examine taxonomic rank other than OTU level

Hello,

I am trying to follow the example given here https://github.com/joey711/phyloseq/issues/683, using DeSeq2 to examine differential abundance at Genus rather than OTU level, however When I import my data into R studio doing the following I only have one taxonomic rank (Kingdom).

map<-import_qiime_sample_data(file.choose())
tree<-read_tree(file.choose())
biomfile<-import_biom(file.choose(),parseFunction=parse_taxonomy_greengenes)
physeq<-merge_phyloseq(biomfile,tree,map)

physeq
phyloseq-class experiment-level object
otu_table() OTU Table: [ 2206 taxa and 66 samples ]
sample_data() Sample Data: [ 66 samples by 11 sample variables ]
tax_table() Taxonomy Table: [ 2206 taxa by 1 taxonomic ranks ]
phy_tree() Phylogenetic Tree: [ 2206 tips and 2204 internal nodes ]

Previously I had imported my data using the following code and I see 7 taxonomic ranks, however when I try to use this data with the code supplied by joey711 (link above) I get the error below

otufile=("otu_table_m1000_minus_cyano_chloro_json_w_consensuslineage.txt")
mapfile=("Mapping_file_LS.txt")
trefile=("rep_set_tree.tre")
qiimedata = import_qiime(otufile, mapfile, trefile)
qiimedata

phyloseq-class experiment-level object
otu_table() OTU Table: [ 2206 taxa and 66 samples ]
sample_data() Sample Data: [ 66 samples by 11 sample variables ]
tax_table() Taxonomy Table: [ 2206 taxa by 7 taxonomic ranks ]
phy_tree() Phylogenetic Tree: [ 2206 tips and 2204 internal nodes ]

GenusFiltered <- subset_taxa(qiimedata, Genus != "NA" & Species == "NA")

Error in rownames<-(*tmp*, value = c("sp1", "sp0")) :
length of 'dimnames' [1] not equal to array extent

The package version of phyloseq that I am using in R studio is 1.19.1
Any help to fix this would be much appreciated

Secondly does anyone know if there is way to use the DeSeq2 function in Qiime to compare higher taxonomic ranks, eg Genus? I am aware that I would have to take the results with a pinch of salt.

If there isnt a way is there a way in which I can use Qiime to do permutation based tests, other than at OTU level?
Cheers,
Sarah
sarah_27_m is offline   Reply With Quote
Old 01-11-2017, 09:53 AM   #2
sarah_27_m
Junior Member
 
Location: London

Join Date: Jan 2017
Posts: 4
Default

Just in case anyone else has this problem, there is a pretty simple fix that worked for me (took me a while to find!!!!)

You can agglomerate taxa of the same type, so for me I did this:

(x1 <- tax_glom(qiimedata, taxrank="Family"))

ntaxa(qiimedata); ntaxa(x1)

qiimedata is my data matrix and then I can simply choose which rank to agglomerate to, then I run my DeSeq2 analysis as usual.
sarah_27_m is offline   Reply With Quote
Reply

Tags
deseq2, qiime, taxonomy

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 02:15 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO