Krona icon indicating copy to clipboard operation
Krona copied to clipboard

ktImportText- multiple samples-one text file

Open DeniRibicic opened this issue 8 years ago • 6 comments

Hi Folks,

I was wondering is it possible to use ktImportText on multiple samples in just one text file? I have a text file containing multiple samples (actually 20) with taxonomy classification and respective abundances. I could not figure out how to use ktImportText option on this one. Otherwise, I will have to subset the text file into 20 new files to produce the desired Krona graph. Just want to save some time if possible.

Regards, Deni

DeniRibicic avatar Jan 21 '17 18:01 DeniRibicic

Hi Deni,

The samples have to be in separate files at the moment. How are the samples denoted in your file? It may be a worthwhile feature to get the sample from a dedicated column, for example.

ondovb avatar Jan 23 '17 17:01 ondovb

@ondovb It's a melted Phyloseq (uses biom format) object. Basically it is a long data format when melted. There is a sample, abundance and different taxonomy level columns.

Sample Abundance Kingdom Phylum Class Order Family Genus
0388s 0.408333218163642 Bacteria Proteobacteria Betaproteobacteria Burkholderiales Comamonadaceae NA
0380s 0.360508003106561 Bacteria Proteobacteria Gammaproteobacteria Alteromonadales Pseudoalteromonadaceae Pseudoalteromonas

Would be pretty convenient to have a sample flag to do it in one run, especially if you have a lot of them.

DeniRibicic avatar Jan 23 '17 20:01 DeniRibicic

Hi Folks, I'm almost getting the same problem with Deni to generate the Krona graph using the KtImportText. The data are in the text file formats generated by Kraken in taxonomic classification. However, during running the scripts (e. g. module load krona/2.4 and KtImportText 1.txt -o 1.html), the krona graph obtained can not open till the family level. It remains instant to open and provide access to the taxonomic identification of microbial species. Please help me to correct the script. Regards, Vincent

vicenzo5 avatar May 17 '17 08:05 vicenzo5

Hi @vicenzo5, At a glance it looks like this might actually be a different issue than the one above. Would you mind sharing a few lines of your input data, and perhaps the result or a screen grab?

ondovb avatar May 17 '17 13:05 ondovb

Hi guys, I often run into the same problem and therefore have made a little script in bash: https://github.com/GenomicaMicrob/OTUsamples2krona The crucial part is the OTUs table file, but there are instruction.

GenomicaMicrob avatar Jul 16 '17 19:07 GenomicaMicrob

Hi there,

I have a very similar problem with ktImportText. MYy file has this format: OTUs, phylogenetic ranks and respective abundance of each OTU in each sample. I will saw you an example:

OTU | Rank1 | Rank2 | Rank3 | Rank4 | Rank5 | Rank6 | Rank7 | CG1 | CG2 7551215f48bfbe48a8888aadf571a122 | D_0__Bacteria | D_1__Actinobacteria | D_2__Actinobacteria | D_3__Micrococcales | D_4__Micrococcaceae | D_5__Nesterenkonia | NA | 0.780425864426646 | 32.6097043918151

The thing is that I know I have to convert my format, but I do not know what does ktImportText needs to read the file.

Thank you a lot.

albaguillen13 avatar Mar 05 '20 12:03 albaguillen13