jbisanz / qiime2r Goto Github PK
View Code? Open in Web Editor NEWImport qiime2 artifacts to R
License: MIT License
Import qiime2 artifacts to R
License: MIT License
Hello,
i am writing here because I'm having some issues installing qiime2R. I have tried other solutions (such as avoiding OneDrive or installing the programs lacking) but it was unsuccesfull...
Here is the code I used
library(devtools)
devtools::install_github("jbisanz/qiime2R")
And here the message I obtained
Error: Failed to install 'qiime2R' from GitHub:
Does not appear to be an R package (no DESCRIPTION)
Además: Warning message:
In utils::untar(tarfile, ...) :
‘tar.exe -xf "C:\Users\Ana\AppData\Local\Temp\RtmpGW9aBl\file1d041dc46e1e.tar.gz" -C "C:/Users/Ana/AppData/Local/Temp/RtmpGW9aBl/remotes1d043d833bea"’ returned error code 1
Thank you all in advance!
Hello!
Thank you for creating this helpful tool; it has been truly beneficial.
I would like to confirm if it's expected for my phyloseq object to contain all zeros in the OTU table. I am certain that my OTU table is not empty.
Thank you for your assistance.
My phyloseq object
phyloseq-class experiment-level object
otu_table() OTU Table: [ 1663 taxa and 48 samples ]
sample_data() Sample Data: [ 48 samples by 4 sample variables ]
tax_table() Taxonomy Table: [ 1663 taxa by 7 taxonomic ranks ]
phy_tree() Phylogenetic Tree: [ 1663 tips and 1656 internal nodes ]
Hi JBisanz,
I tried importing .qza files (feature table, metadata file, taxonomy file, and a tree file) as a phyloseq object using the qiime2R package (version ‘0.99.6’), but I keep getting an error in the form
"Error in FUN(X[[i]], ...) :
numbers of left and right parentheses in Newick string not equal".
However,
Could you please help me overcome this error?
Hello,
Thanks a lot for the tutorial you created to install this package.
I followed the tutorial to install the program, but I was not able to install it.
Here are the commands and error that I got:
devtools::install_github("jbisanz/qiime2R")
Downloading GitHub repo jbisanz/qiime2R@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?
1: All
2: CRAN packages only
3: None
4: backports (1.2.0 -> 1.2.1) [CRAN]
5: dplyr (1.0.3 -> 1.0.4) [CRAN]
Enter one or more numbers, or an empty line to skip updates:
√ checking for file 'C:\Users\lauta\AppData\Local\Temp\RtmpaK2itC\remotes8cc05167186\jbisanz-qiime2R-43b6bf1/DESCRIPTION' ...
Installing package into ‘C:/Users/lauta/OneDrive - University of Florida/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
let me know if you can help to figure out what is the problem!
Here it says that the metadata should be "a qiime2-compliant TSV metadata file". However, when I import my compliant metadata file, the resulting sam_data uses the 3rd row (containing information about my first sample) as the "header" row, making it into column names when it should not be. This seems to be due to the fact that the identifier column can be named starting with a "#", according to the qiime2 documentation, and that the second row, which has information about the type of data in the columns (numeric or categorical), also starts with a "#". Removing the second row and renaming the identifier column to omit the "#" allows proper column naming, but it seems like there needs to be some sort of warning about this behavior, especially because naming the identifier column with a "#" is permissible.
ETA: Leaving the second row as-is with the "#" would work as well, because it's not useful data to have in the resulting sam_data data.frame; I just deleted it when I was playing around with trying to import my data correctly.
Hi there
When I try to make a phyloseq object with the following code, the phyloseq object seems to only recognise the samples not the negative controls. Does anyone know why this may be happening? I have the names of the controls in my metadata file so they should be coming up.
library("qiime2R")
physeq3<-qza_to_phyloseq(
features="DADA2-table4andneg.qza",
tree="rooted-tree4andneg.qza",
"NCBI_LSURef_97_10_uniq_5-8-300_classification_VSEARCHwithneg.qza",
metadata = "metadata-2.txt")
physeq3
Thanks
I had trouble re-running an old analysis that included a code block from your example.
metadata %>%
filter(!is.na(shannon)) %>%
ggplot(aes(x=`days-since-experiment-start`, y=shannon, color=`body-site`)) +
stat_summary(geom="errorbar", fun.data=mean_se, width=0) +
stat_summary(geom="line", fun.data=mean_se) +
stat_summary(geom="point", fun.data=mean_se) +
xlab("Days") +
ylab("Shannon Diversity") +
theme_q2r() + # try other themes like theme_bw() or theme_classic()
scale_color_viridis_d(name="Body Site") # use different color scale which is color blind friendly
ggsave("Shannon_by_time.pdf", height=3, width=4, device="pdf") # save a PDF 3 inches by 4 inches
This returns an error now.
Error in `filter()`:
! Problem while computing `..1 = !is.na(shannon)`.
✖ Input `..1` must be of size 34 or 1, not size 31.
Traceback
Upon returning to my renv.lock
file, I see I had dplyr
1.0.6 installed; however, restoring the renv environment brought dplyr
to 1.0.9, which gives the error above. When rolled back to the older version of dplyr, the issue went away.
Hello all,
I am trying to create a phyloseq object but I am getting an error. I have searched different pages and forums but I couldn't find a solution for my problem. I would really appreciate it if anyone could help me out, please.
The codes that I am running in R are the following:
physeq <- qza_to_phyloseq( features = "table.qza", tree = "rooted_tree.qza", taxonomy = "taxonomy.qza", metadata = "metadata.tsv" )
And the error that I get is:
Error in methods::as(data[[i]], colClasses[i]) : no method or default for coercing “character” to “Categorical”
The metadata that I am using is the following:
Thank you all.
Hi! I hope you can make this available for 3.6 soon.
Thanks!
Hi, I was running into an issue when I tried to convert QIIME2 to phyloseq. See below.
physeq<-qza_to_phyloseq( features="mergerep.qza")
Error in validObject(.Object) : invalid class “otu_table” object:
Non-numeric matrix provided as OTU table.
Abundance is expected to be numeric.
Then I checked the Type and it shows "Sequence" instead of "Frequency".
SVs$type
[1] "FeatureData[Sequence]"
So I was wondering if there is any way to convert the type to Frequency before I import into phyloseq?
Thanks,
Thanks for making this package! It beats running a long set of command line commands to do the conversion.
As far as I can tell, qiime2R
isn't available on CRAN or bioconductor as of yet, although your recent git commit message "v0.99 preparing for bioconductor" suggests that qiime2R
will soon be on bioconductor. When do you think that your package will be available on bioconductor?
I'm asking because I'd like to create a bioconda recipe for qiime2R
, but it is much preferred to have a CRAN or bioconductor url instead of a GitHub release url.
Hello,
I used summarize_taxa to give me the sum of the counts, but the function returned the wrong sum by placing the results in column P168.
The data is attached.
Would you happen to have any suggestions to fix this issue?
The code used is:
taxonomy <- read_qza ("taxonomy.qza")$data %>% parse_taxonomy()
SVs<-read_qza("table.qza")$data
abundance <- summarize_taxa(SVs, taxonomy)$Genus
view(abundance)
Thanks.
Hello and thanks for the great job,
I'm having an issue while creating a taxa_barplot, "category" is not recognized or the facet_grid is not working well somehow.
taxa_barplot(taxasum1, metadata, category = "status")
And the status variable is:
> metadata$status
[1] HC HC HC HC HC HC HC HC HC HC HC HC HC HC UC UC UC UC UC UC UC UC UC UC UC UC
[27] UC UC
Levels: HC UC
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS/LAPACK: /gpfs42/robbyfs/homes/aplic/noarch/software/OpenBLAS/0.3.1-GCC-7.3.0-2.30/lib/libopenblas_nehalemp-r0.3.1.so
locale:
[1] en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] forcats_0.4.0 stringr_1.4.0 dplyr_0.8.3 purrr_0.3.2
[5] readr_1.3.1 tidyr_1.0.0 tibble_2.1.3 ggplot2_3.2.1
[9] tidyverse_1.2.1 qiime2R_0.99.34
loaded via a namespace (and not attached):
[1] nlme_3.1-141 phyloseq_1.26.1 lubridate_1.7.4
[4] RColorBrewer_1.1-2 httr_1.4.1 tools_3.5.1
[7] backports_1.1.4 utf8_1.1.4 R6_2.4.0
[10] vegan_2.5-6 DT_0.8 rpart_4.1-15
[13] Hmisc_4.2-0 lazyeval_0.2.2 BiocGenerics_0.28.0
[16] mgcv_1.8-28 colorspace_1.4-1 permute_0.9-5
[19] ade4_1.7-13 nnet_7.3-12 NADA_1.6-1
[22] withr_2.1.2 tidyselect_0.2.5 gridExtra_2.3
[25] compiler_3.5.1 cli_1.1.0 rvest_0.3.4
[28] Biobase_2.42.0 htmlTable_1.13.1 xml2_1.2.2
[31] labeling_0.3 scales_1.0.0 checkmate_1.9.4
[34] digest_0.6.20 foreign_0.8-72 XVector_0.22.0
[37] base64enc_0.1-3 pkgconfig_2.0.2 htmltools_0.3.6
[40] htmlwidgets_1.3 rlang_0.4.0 readxl_1.3.1
[43] rstudioapi_0.10 zCompositions_1.3.2-1 generics_0.0.2
[46] jsonlite_1.6 acepack_1.4.1 magrittr_1.5
[49] Formula_1.2-3 biomformat_1.10.1 Matrix_1.2-17
[52] fansi_0.4.0 Rcpp_1.0.5 munsell_0.5.0
[55] S4Vectors_0.20.1 Rhdf5lib_1.4.3 ape_5.3
[58] lifecycle_0.1.0 stringi_1.4.3 yaml_2.2.0
[61] MASS_7.3-51.4 zlibbioc_1.28.0 rhdf5_2.26.2
[64] plyr_1.8.4 grid_3.5.1 parallel_3.5.1
[67] crayon_1.3.4 lattice_0.20-38 Biostrings_2.50.2
[70] haven_2.1.1 splines_3.5.1 multtest_2.38.0
[73] hms_0.5.1 zeallot_0.1.0 knitr_1.24
[76] pillar_1.4.2 igraph_1.2.4.1 reshape2_1.4.3
[79] codetools_0.2-16 stats4_3.5.1 glue_1.3.1
[82] latticeExtra_0.6-28 data.table_1.12.2 modelr_0.1.5
[85] vctrs_0.2.0 foreach_1.4.7 cellranger_1.1.0
[88] gtable_0.3.0 assertthat_0.2.1 xfun_0.9
[91] broom_0.5.2 survival_2.44-1.1 truncnorm_1.0-8
[94] iterators_1.0.12 tinytex_0.15 IRanges_2.16.0
[97] cluster_2.1.0 ellipsis_0.2.0.1
Do you know what is happening here?
Many thanks!
Marc
Hi,
Thanks for developing and maintaining the qiim2R package that makes life a lot easier when exporting qiime2 artifacts to R. I tried to import first-differences/distances artifacts from the q2-longitudinal plugin, but I couldn't find the data after importing qiime2 artifacts with qiime2R. I guess this is not supported yet?
Very low priority but easy update: if there are any failed samples (0 reads) for taxa_barplot, the normalization functions produce NaNs from dividing by zero. This results in all taxa plotted as 'remainder'. I imagine that most would filter out samples with no reads before plotting. But, if taxa_barplot is used for diagnostics in a pipeline (as we do), it can be a difficult to determine why it is happening. I overwrite the qiime2R::make_proportion function to return the 0's for failed samples.
make_proportion2 <- function (features)
{
features <- apply(features, 2, function(x) {
if (sum(x) > 0) { x/sum(x) } else { x }
})
return(features)
}
assignInNamespace("make_proportion", value = make_proportion2, ns = "qiime2R")
The same could be done with make_percent
Thanks!
Hello,
I am new to R and trying to install qiime2R, but seems qiime2R couldn't be installed in version 4.0.1
In this case, how to install qiime2R?
Thanks for your help
Lin
Good day!
May I know how do I create a phyloseq object with DNAStringSet
using qiime2R as shown as below?
Your inputs are much appreciated!
ps
#> phyloseq-class experiment-level object
#> otu_table() OTU Table: [ 2432 taxa and 18 samples ]
#> sample_data() Sample Data: [ 18 samples by 11 sample variables ]
#> tax_table() Taxonomy Table: [ 2432 taxa by 7 taxonomic ranks ]
#> phy_tree() Phylogenetic Tree: [ 2432 tips and 2431 internal nodes ]
#> refseq() DNAStringSet: [ 2432 reference sequences ]
Hello. I've tried installing qiime2R in the following ways
install.packages("remotes")
library(remotes)
remotes::install_github("jbisanz/qiime2R")
if (!requireNamespace("devtools", quietly = TRUE)){install.packages("devtools")}
library(devtools)
devtools::install_github("jbisanz/qiime2R")
Both ways received the same error
Downloading GitHub repo jbisanz/qiime2R@HEAD
Error: Failed to install 'qiime2R' from GitHub:
'from' must be of length 1
What does this error mean and how else should I try installing qiime2R?
Thank you.
I am trying to exclude the tree file for an analysis that is going to use merge_phyloseq and the tree files just mess everything up.
When I try to leave out the tree file, I get an error. Is there a way to exclude the tree file?
Hi,
I have a problem plotting beta diversity.
When I run the following command:
bray_curtis$data$Vectors %>% select(SampleID, PC1, PC2) %>% left_join(metadata) %>% left_join(shannon) %>% ggplot(aes(x=PC1, y=PC2, color=
Sampling_time, shape=
Sampling_site, size=shannon)) + geom_point(alpha=0.5) + #alpha controls transparency and helps when points are overlapping theme_q2r() + scale_shape_manual(values=c(16,1), name="Sampling_site") + #see http://www.sthda.com/sthda/RDoc/figure/graphs/r-plot-pch-symbols-points-in-r.png for numeric shape codes scale_size_continuous(name="Shannon Diversity") + scale_color_discrete(name="Sampling_time")
I get the following error:
Error:
xand
ymust share the same src, set
copy= TRUE (may be slow). Run
rlang::last_error() to see where the error occurred.
Could you please help me solve this issue?
Cheers,
Pablo
Hi @jbisanz,
I am working on a 16s rRNA project and have analyzed my data using qiime2 and visualized most of my figures in R.
Thanks to you and other experts from this field.
Now, I am trying to make a "Dot plot showing the relative abundance (in %) of common bacterial OTUs" using R, as shown in the figure below. On the X-axis I want to arrange sampling-day
in ascending order and on the Y-axis I want to have top 20
most abundant taxa.
I have an OTU table
with OTU ID
as rows and sample-id
as columns.
table.txt
My metadata
file is
metadata_bact_R.txt
The problem with many solutions online is that they do not show the actual format of their input file used for analysis in R.
Therefore, it becomes difficult to understand what are the contents within that input file.
It would be so kind of you if you could write an R script or at least suggest a solution for this issue.
Thank you,
Govind
I am having an issue with parsing taxonomy and moving taxonomy into phyloseq when manually creating a phyloseq object. This is possible an issue with read_qza()
, because everything seems to work correctly with qza_to_phyloseq()
.
Using the QIIME2 Moving Pictures Tutorial taxonomy data (taxonomy.qza)
test_taxonomy<-read_qza("taxonomy.qza")
parse_taxonomy(test_taxonomy)
The following error occurs:
Error in parse_taxonomy(test_taxonomy) :
Table does not match expected format (colnames(obj) are Feature.ID, Taxon, (Confidence OR Consensus))
Attempting to create a manual phyloseq object, with my data that worked with qza_to_phyloseq():
WildCombined_table<-read_qza("WildCombined_table.qza")
WildCombined_IQtree<-read_qza("WildCombined_IQ_rooted-tree.qza")
WildCombined_taxonomy<-read_qza("WildCombined_SILVA138_taxonomy.qza"):
WildCombined_metadata<-phyloseq::import_qiime_sample_data("../../WildCombinedMapping.txt")
WildCombined_ps_manual<-phyloseq(otu_table(WildCombined_table$data,taxa_are_rows=TRUE), phy_tree(WildCombined_IQtree$data),tax_table(WildCombined_taxonomy$data), sample_data(WildCombined_metadata))
The following error occurs:
Error in validObject(.Object) : invalid class “phyloseq” object:
Component taxa/OTU names do not match.
Taxa indices are critical to analysis.
Try taxa_names()
In addition: Warning message:
In .local(object) : Coercing from data.frame class to character matrix
prior to building taxonomyTable.
This could introduce artifacts.
Check your taxonomyTable, or coerce to matrix manually.
I can confirm this error does not occur if I exclude the tax_table from the phyloseq object creation.
Versions:
QIIME version 2020.6
phyloseq_1.32.0
qiime2R_0.99.34
Hi,
When I use qza_to_phyloseq for taxonomy artifacts called with Greengenes, the resulting phyloseq object has the taxonomy parsed correctly. However, I need to analyze artifacts called with SILVA and the qza_to_phyloseq is no longer parsing the taxonomy correctly. I have tried to figure out a workaround but have not been successful. How do I change my phyloseq object to correctly parse the taxonony file for downstream analysis? This is the format of the SILVA taxonomy for your reference. "D_0__Bacteria;D_1__Fusobacteria;D_2__Fusobacteriia;D_3__Fusobacteriales;D_4__Leptotrichiaceae;D_5__Leptotrichia;D_6__Leptotrichia sp. oral clone FP036"
I've previously used qiime2R (in a different R version), and found it really useful. I have to re-install it, and I tried following the instructions posted:
if (!requireNamespace("devtools", quietly = TRUE)){install.packages("devtools")} devtools::install_github("jbisanz/qiime2R")
But I keep getting errors like this:
Error: Failed to install 'unknown package' from GitHub: Timeout was reached: [api.github.com] Operation timed out after 16369 milliseconds with 0 out of 0 bytes received
The time changes, but it is otherwise the same error message.
I'm using 3.6.3 in RStudio on Windows.
Is there any alternative way to do the installation? Thanks!
Hi @jbisanz
Thanks for your codes, much easier to make bar plots & heatmaps at different taxonomic level,
Please can you also suggest, how to make an average of all samples from each group and make a bar plot/heatmap at the genus level from qzv file?
Thanks
Hi, read_qza()
fuction is so much helpful to me! Thanks!
Today, I noticed BiocInstaller is now deprecated and BiocManager package(available at CRAN) is now recommended.
I know that this is the very last issue to deal with, but may makes your package more adnvanced!
When running the qza_to_phyloseq, I am able to join the otu_table, tree, taxonomy, and metadata into a phyloseq file, but the taxonomic hierarchy is not parsed because the PR2 database uses ";" not "; ". I did try to build all the components separately. Then, I could parse the taxonomy qza file into a a taxa_file(taxtable):
taxtable<-taxonomy$data %>% as_tibble() %>% separate(Taxon, sep=";", c("Kingdom","Supergroup","Division","Class","Order","Family", "Genus", "Species")) #convert the table into a tabular split version
taxtable<-taxtable[-1,]#remove the second line that specifies the data type
taxtable$Confidence<-NULL #remove the Confidence column
The table looks correct and all other components (otu_table, metadata) are parsed correctly.
When I went to combine all using qzq_to_phyloseq, I get “Error in unzip(file, exdir = tmp) : invalid zip name argument”
I am running R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"
Qza files are from Qiime2-2019.1 version.
Any help would be wonderful.
Thank you,
Chris
Sorry, I think I have finally found the correct platform to submit a qiime2R issue.
Hello, I have installed the qiime2R package into R on my windows machine. I am able to successfully run commands which only have a single argument since I can designate the exdir path. The following two commands work fine.
otus<-read_qza(“table.qza” , tmp=“C:\tmp”)
otus<-read_qza(“table.qza” , tmp=“C:/tmp”)
When I run the qza_to_phyloseq command…
physeq<-qza_to_phyloseq(“table.qza”,“rooted-tree.qza”,“taxonomy.qza”, “sample-metadata.tsv”)
I receive the the error…
Error in unzip(file, exdir = tmp) : ‘exdir’ does not exist
How best can the exdir be designated in a windows R environment?
Hi @jbisanz
qza_to_phyloseq and read_qza do not manage to open correctly my silva taxonomy file. I got a warning message (see attached). It creates the phyloseq object but the taxonomy has 8335 rows (= ASVs) instead of 34550. I converted my qza file to tsv file and checked that it contains effectively 34550 ASVs.
I think it is because there is a unusual character in row 8335. Basically the taxonomy is "D_6__[Clostridium] piliforme (Tyzzer's bacillus)". I wonder if it is because the functions can not handle the ' ?
Could you advise on what I can do? I am happy to send you my qza file but I do not manage with this platform.
Many thanks for your help.
A.
Hello - I'm trying to install qiime2R in RStudio (v2023.09.0+463) using the code provided:
If (!requireNamespace("devtools", quietly = TRUE)){install.packages("devtools")}
devtools::install_github("jbisanz/qiime2R")
This command gave the following output at the end:
ERROR: dependency ‘Hmisc’ is not available for package ‘qiime2R’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/qiime2R’
Warning messages:
1: In i.p(...) :
installation of package ‘stringi’ had non-zero exit status
2: In i.p(...) :
installation of package ‘RcppArmadillo’ had non-zero exit status
3: In i.p(...) : installation of package ‘vegan’ had non-zero exit status
4: In i.p(...) : installation of package ‘igraph’ had non-zero exit status
5: In i.p(...) : installation of package ‘ape’ had non-zero exit status
6: In i.p(...) : installation of package ‘Hmisc’ had non-zero exit status
7: In i.p(...) : installation of package ‘ade4’ had non-zero exit status
8: In i.p(...) :
installation of package ‘/var/folders/pg/08g3vsq5451gz2slxjl12gh40000gn/T//RtmpQoAkkX/fileb6aa4c62c755/qiime2R_0.99.6.tar.gz’ had non-zero exit status
So, when I try to add qiime2R into my library, I get the following error.
> library(qiime2R)
Error in library(qiime2R) : there is no package called ‘qiime2R’
Hi team,
Thanks for making such a great tool! I am trying to use taxa_heatmap and wondering if it is possible to re-order the x-label?
Cheers, Ding
Hi @jbisanz
qza_to_phyloseq()
only imports correctly taxonomy.qza
generated with Greengenes db, not Silva. Sorry I don't have the object for you but the Taxon
in the latter case is written as, for example:
"D_0__Bacteria;D_1__Firmicutes;D_2__Clostridia;D_3__Clostridiales;D_4__Ruminococcaceae;D_5__Ruminococcaceae NK4A214 group;D_6__uncultured bacterium"
So lines 38 - 41 in qza_to_phyloseq.R
is not adapted. I can do a PR, if you like.
Hi,
I tried to install the package the R studio through devtools and through remotes, neither of them worked.
Here is the code that the output error
library(remotes)
remotes::install_github("jbisanz/qiime2R")
Downloading GitHub repo jbisanz/qiime2R@master
Skipping 12 packages ahead of CRAN: Biostrings, biomformat, phyloseq, BiocGenerics, S4Vectors, IRanges, XVector, rhdf5, Biobase, multtest, zlibbioc, Rhdf5lib
Error: Failed to install 'qiime2R' from GitHub:s6gqzfn4v15p_mcs36ytm140000gn/T/RtmpDUCyxB/remotes89c2bec9f5/jbisanz-qiime2R-3fc6241/DESCRIPTION’ ...
lazy-load database '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/prettyunits/R/prettyunits.rdb' is corrupt
In addition: Warning messages:
1: In paste0(" (", pretty_dt(elapsed), ")") :
restarting interrupted promise evaluation
2: In paste0(" (", pretty_dt(elapsed), ")") :
internal error -3 in R_decompress1
Same output but doing with devtools.
library(devtools)
devtools::install_github("jbisanz/qiime2R")
Downloading GitHub repo jbisanz/qiime2R@master
Skipping 12 packages ahead of CRAN: Biostrings, biomformat, phyloseq, BiocGenerics, S4Vectors, IRanges, XVector, rhdf5, Biobase, multtest, zlibbioc, Rhdf5lib
Error: Failed to install 'qiime2R' from GitHub:s6gqzfn4v15p_mcs36ytm140000gn/T/RtmpDUCyxB/remotes89ca5a1498/jbisanz-qiime2R-3fc6241/DESCRIPTION’ ...
lazy-load database '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/prettyunits/R/prettyunits.rdb' is corrupt
In addition: Warning messages:
1: In paste0(" (", pretty_dt(elapsed), ")") :
restarting interrupted promise evaluation
2: In paste0(" (", pretty_dt(elapsed), ")") :
internal error -3 in R_decompress1
Does anyone had the same error or knows what is about the corrupt?
Thank you!
Stay safe.
Hi,
Is there a way to override the default ordering of the category by alphabetical order on the x-axis?
Thanks
Hello.
I am trying to convert qza files to a phyloseq object in R for the first time.
My code is:
phy <- qza_to_phyloseq("id-filtered-table.qza", "rooted-tree.qza", "sepp-refs-gg-13-8.qza","meta.tsv")
I'm getting the error:
Error in read_yaml(paste0(tmp, "/", paste0(gsub("/..+", "", unpacked$Name[1]), :
could not find function "read_yaml"
Do you know what might be causing this error?
Thanks heaps!
Would it be at all possible to change this package to support R version 3.4.1, which is the version currently installed by qiime2? This would enable qiime2R to be installed directly in the qiime2 Conda environment, which I bet many people would find helpful.
I'm having some hairy dependency issues surrounding hdf5 libraries, and currently facing a situation where I am able to get biomformat to read biom files in 3.4.1 but not 3.5.
What do you think?
Hi @jbisanz ,
I recently updated R to 4.1.1 because of compatibility issues. However, now when I try to import a .qza tree file I get the following error:
Error in FUN(X[[i]], ...) :
numbers of left and right parentheses in Newick string not equal
Any idea how to fix this without running two versions of R?
Thanks!
Jordan
Hello,
Thanks so much for making this package. For my workflow, I am analyzing abundance data in R and then exporting it to Qiime 2 for other analyses (e.g., Songbird). This currently requires me to first export as a biom table in R and then, using a separate conda environment, convert that biom table to a qza object using Qiime 2. It would be much faster, though, to simply go from a table in R to exporting a qza file. Is this possible to do with qiime2R? (I looked in the documentation but couldn't find this; moreover, the closest function write_q2manifest()
is not applicable)
Thanks!
Hi, I imported my files from qiime2 into a phyloseq object:
physeq1<-qza_to_phyloseq(
features="DADA2-table4.qza",
tree="rooted-tree4.qza",
"NCBI_LSURef_97_10_uniq_5-8-300_classification_blast.qza",
metadata = "metadata-1.txt")
physeq1
phyloseq-class experiment-level object
otu_table() OTU Table: [ 1842 taxa and 192 samples ]
sample_data() Sample Data: [ 192 samples by 5 sample variables ]
tax_table() Taxonomy Table: [ 1842 taxa by 7 taxonomic ranks ]
phy_tree() Phylogenetic Tree: [ 1842 tips and 1840 internal nodes ]
I then tried to split my data into samples from Namibia and from South Africa and used the following code:
Namdata <- subset_samples(physeq1, country %in% c("Namibia"))
and got the following error message:
Error in validObject(.Object) :
invalid class “sample_data” object: Sample Data must have non-zero dimensions.
Please help
Anya
Hello,
I've had a lot of issues trying to install this package into RStudio (4.0.4). I am currently working in Windows 10 and here are the steps I've taken.
if (!requireNamespace("devtools", quietly = TRUE)){install.packages("devtools")}
devtools::install_github("jbisanz/qiime2R")
I receive this message:Downloading GitHub repo jbisanz/qiime2R@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?
1: All
2: CRAN packages only
3: None
4: ade4 (1.7-17 -> 1.7-18) [CRAN]
Enter one or more numbers, or an empty line to skip updates: 2
ade4 (1.7-17 -> 1.7-18) [CRAN]
Installing 1 packages: ade4
Installing package into ‘C:/Users/angel/OneDrive/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
ade4 1.7-17 1.7-18 TRUE
trying URL 'http://cran.rstudio.com/bin/windows/contrib/4.0/ade4_1.7-17.zip'
Content type 'application/zip' length 5226980 bytes (5.0 MB)
downloaded 5.0 MB
package ‘ade4’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\angel\AppData\Local\Temp\Rtmp69Vana\downloaded_packages
Error: Failed to install 'qiime2R' from GitHub:
System command 'Rcmd.exe' failed, exit status: 1, stdout + stderr empty
download.file("https://github.com/jbisanz/qiime2R/archive/master.zip", "source.zip")
unzip("source.zip")
install.packages("qiime2R-master", repos = NULL, type="source")
Getting an error saying:
Installing package into ‘C:/Users/angel/OneDrive/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
installation of package ‘qiime2R-master’ had non-zero exit status
devtools::install("C:/Users/angel/OneDrive/Documents/qiime2R-master/")
, but I still receiveError in (function (command = NULL, args = character(), error_on_status = TRUE, :
System command 'Rcmd.exe' failed, exit status: 1, stdout + stderr empty
I made sure to have Rtools installed and pathed correctly and am still receiving the same errors. Please advise on what I could do about this!
A colleague sent me a qza file containing trimmed reads. I use qiime2r in other projects where they send me the finished assigned product, but this time it's only the trimmed reads. I know in qiime2 you can export qza as fasta, but I like qiime2r because this way I never have to download qiime2 and I can just got through R. Is there a way in this package that I can take a qza and get fasta files for dada2 input?
Hi,
First, thank you for this package, I've used it a lot in the past and it's saved me a ton of time.
I'm having an issue with the read_qza
function when I try to read an ASV table. I'm using qiime2-2020.2 and the latest version of qiime2R. This is a table that I'm generating within R and importing into qiime2. I don't get any issues within qiime, and I recall being able to run this command without issue last time I used this package (months ago), so hopefully this is something we can clear up!
Here's the error:
> SVs <- read_qza("asv_table.qza")
Error in dimnamesGets(x, value) :
invalid dimnames given for “dgCMatrix” object
Calls: read_qza ... colnames<- -> dimnames<- -> dimnames<- -> dimnamesGets
Execution halted
Here's my session info:
_
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 3
minor 6.2
year 2019
month 12
day 12
svn rev 77560
language R
version.string R version 3.6.2 (2019-12-12)
nickname Dark and Stormy Night
> library(qiime2R)
> session.info()
Error in session.info() : could not find function "session.info"
> sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server 7.7 (Maipo)
Matrix products: default
BLAS: /usr/lib64/libblas.so.3.4.2
LAPACK: /usr/lib64/liblapack.so.3.4.2
locale:
[1] LC_CTYPE=en_US.utf8 LC_NUMERIC=C
[3] LC_TIME=en_US.utf8 LC_COLLATE=en_US.utf8
[5] LC_MONETARY=en_US.utf8 LC_MESSAGES=en_US.utf8
[7] LC_PAPER=en_US.utf8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] qiime2R_0.99.33
loaded via a namespace (and not attached):
[1] Biobase_2.46.0 tidyr_1.0.2 jsonlite_1.6.1
[4] splines_3.6.2 foreach_1.5.0 Formula_1.2-3
[7] assertthat_0.2.1 stats4_3.6.2 phyloseq_1.30.0
[10] latticeExtra_0.6-29 yaml_2.2.1 pillar_1.4.3
[13] backports_1.1.5 lattice_0.20-40 glue_1.4.1
[16] digest_0.6.25 RColorBrewer_1.1-2 XVector_0.26.0
[19] checkmate_2.0.0 colorspace_1.4-1 htmltools_0.4.0
[22] Matrix_1.2-18 plyr_1.8.6 pkgconfig_2.0.3
[25] zlibbioc_1.32.0 purrr_0.3.3 scales_1.1.0
[28] jpeg_0.1-8.1 htmlTable_1.13.3 tibble_3.0.0
[31] mgcv_1.8-31 IRanges_2.20.2 ggplot2_3.3.0
[34] DT_0.13 ellipsis_0.3.0 nnet_7.3-13
[37] BiocGenerics_0.32.0 cli_2.0.2 survival_3.2-3
[40] magrittr_1.5 crayon_1.3.4 fansi_0.4.1
[43] nlme_3.1-145 MASS_7.3-51.5 foreign_0.8-76
[46] truncnorm_1.0-8 vegan_2.5-6 tools_3.6.2
[49] data.table_1.12.8 lifecycle_0.2.0 stringr_1.4.0
[52] Rhdf5lib_1.8.0 S4Vectors_0.24.3 munsell_0.5.0
[55] cluster_2.1.0 Biostrings_2.54.0 ade4_1.7-15
[58] compiler_3.6.2 rlang_0.4.5 rhdf5_2.30.1
[61] grid_3.6.2 iterators_1.0.12 biomformat_1.14.0
[64] rstudioapi_0.11 htmlwidgets_1.5.1 igraph_1.2.5
[67] base64enc_0.1-3 gtable_0.3.0 codetools_0.2-16
[70] multtest_2.42.0 reshape2_1.4.3 R6_2.4.1
[73] gridExtra_2.3 knitr_1.28 dplyr_0.8.5
[76] Hmisc_4.4-0 permute_0.9-5 ape_5.3
[79] stringi_1.4.6 parallel_3.6.2 NADA_1.6-1.1
[82] Rcpp_1.0.4 vctrs_0.2.4 zCompositions_1.3.4
[85] rpart_4.1-15 acepack_1.4.1 png_0.1-7
[88] tidyselect_1.0.0 xfun_0.12
I am using R v. 3.5.2 on Windows and when performing the "qza_to_phyloseq" command Error in unzip(file, exdir = tmp) : 'exdir' does not exist.
I tried setting tmp to an empty folder in my working directory as I saw on other threads but end up with another error of Error in file(con, "r") : cannot open the connection.
I know that my working directory is set correctly and that the file names are all correct.
Hello, I'm very new to coding and all the info provided on this page makes processing this data so easy, so thank you! However, when I plot the taxa bar plots, I'd like it to assign colours to more than 10 species, but I don't know how to open up the "remainder" category. Any suggestions would be grea
t!
Hi,
Firstly, thanks so much for creating the qiime2r tutorials - as a coding newbie I found them very clear and easy to understand.
I was just wondering if there is a way to specify the order of the samples in the taxa_heatmap() plots?
Many Thanks,
Hello everyone,
I'm using the taxa_barplot
to make stacked barplots for different taxon levels. When I use the default ntoplot
(that limits to 10 taxa) the color pallete is great, with the reminder colored in grey, that is a pattern that I want to keep for the others barplots.
But when I use ntoplot
with more taxa (I tested with ntoplot = 12 or ntoplot = 15) the color pallete changes. So how can I keep the default color pallete ? Here are the images for comparasion.
SVs<-read_qza("table.qza")
Error in unzip(file, exdir = tmp) : 'exdir' does not exist
I can't seem to load the qiime2R package. I've successfully installed it, but when I try to load it, I get this error:
library(qiime2R)
Error: package or namespace load failed for ‘qiime2R’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/.../Library/R/3.6/library/Rhdf5lib/libs/Rhdf5lib.so':
dlopen(/Users/.../Library/R/3.6/library/Rhdf5lib/libs/Rhdf5lib.so, 6): Library not loaded: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libR.dylib
Referenced from: /Users/.../Library/R/3.6/library/Rhdf5lib/libs/Rhdf5lib.so
Reason: image not found
My best (somewhat inexperienced) guess is version incompatibilities? Any insight would be appreciated!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.