Unable to Load shannon_vector.qza into r

Hi! I apologize if this question is somewhat tangential to the purposes of the Qiime2forum, but I've been having difficulty making visualizations with my output. I'm trying to follow the tutorial Tutorial: Integrating QIIME2 and R for data visualization and analysis using qiime2R
However, when I try and import my shannon vector data into R I get the following error:
Screen Shot 2021-11-22 at 12.13.41 PM
I'm not sure if there is some processing I need to do with the shannon_vector.qza file which is right from Qiime2, but I can't do any PCOA or Shannon analysis/plotting without it being uploaded. Any insight into the issue or solutions would be much appreciated! I'm hoping to be able to view​ and present my data soon.

Hi @jecohen,
Which version of QIIME 2 and Qiime2R do you have installed?
Are you sure the shannon_vector.qza is in the home directory set in your R environment?

Would you mind sharing your shannon_vector.qza file? You can send this via a DM if you'd prefer.

Thanks for your quick reply! I'm using Qiime2 version qiime2.2021.2 and Qiime2R version qiime2R_0.99.6. I've just sent you the shannon_vector.qza file I'm trying to upload. I was able to load other files, including Qiime2 stats output (unweighted_unifrac_pcoa_results.qza), from the same directory so I don't think that is the problem.
Thanks for your help!

Hi @jecohen,
Thanks for sharing your file. I can confirm that I was able to reproduce the same error with your artifact. I had no problem importing the shannon_vector.qza from either the 2021.2 or 2021.8 Moving Pictures tutorial with qiime2R 0.99.6 so I do think there's something specific about your artifact. I don't know exactly what the problem is, my first guess is that qiime2R is not liking your sample-names having ., -, and empty spaces, but I'm totally guessing here.
You have a couple of options:

  1. Import your shannon_vector.qza file into R manually. Just use qiime tools export command to grab the underlying table in that artifact and import it into R as you would with any TSV file.
  2. You can also try renaming your your sample names in your feature-table to remove those special characters and re-run core-metrics. This option is me just guessing and not guaranteed to work, but it would be a good confirmation of the error one way or another :stuck_out_tongue:

I'm also pinging @jbisanz here, the developer of qiime2R to see if he has any thoughts.

update: I just found this thread with a similar issue that seems to have been resolved by fixing the empty space in the sample name.

1 Like

The offending character would almost certainly the spaces in the sample names. Behind the scenes the read.table function is being used which is trying to guess the delimiter for the table (which in my memory can be either csv or tsv). I will try to remember this for next time I am making tweaks but as a general guideline I would always recommend using underscores instead of spaces in sample names!

1 Like

Thanks for running the analysis and the feedback! I was able to use Qiime-tools-export to extract tsv files and upload them. I'm sure replacing the sample names with underscores would be effective as well, but for the time being the extraction was the simpler solution. Thanks for the help & speedy replies!

1 Like