Alpha diversity on a csv file?

Hi everyone!

I was wondering if its possible to run an alpha diversity analysis on a csv file that has its taxonomy assigned. First I took my .fastq files through a metagenomics pipeline (IDseq) and after filtering the host it gave me the number of reads mapped to bacteria, fungi, arches, virus, and non-aligned reads. I would like to know if there’s any way to convert a .csv file with taxonomy and reada into a qiime2 artifact that could be run through that alpha diversity analysis (and potentially pcoa and permanova)?

Thanks a lot!


@daniel.castanedamogo, what does your data actually look like? Examples/screenshots of a few lines from the files your working with might help people figure out whether this is possible.

Hi @ChrisKeefe! Thanks for your fast response, and apologies for my delayed one! Yes, absolutely. I am attaching a file that shows how my data looks. Basically - as you can see - it shows the taxa name identified, along with the rPM value. The first second, third and fourth column shows the results for each sample.combined_sample_taxon_results_NT.rpm.csv (12.3 KB)

What is the rPM value? Reads per million, maybe? If I’m reading this right, and these are relative frequency values of some kind, for three samples and 325 features, what you have is basically a FeatureTable[RelativeFrequency]. Does this sound right to you? The most common alpha diversity measures accept this semantic type, which means you may be in luck!

If this sounds like your situation, your mission would be to import your data as a FeatureTable[RelativeFrequency]. You could do this by reading the CSV into python and importing from a pandas dataframe, by converting the CSV into a TSV and then a biom.table, and importing that, or probably a number of other other nifty ways I’m overlooking. Does that help point you in the right direction?

Chris :microbe:

Hi Chris! Thanks for your reply. Indeed, rPM stands for reads per million. I will give it a try and get back to you. Thanks a lot! (:slight_smile:

1 Like