metagenome-atlas / atlas

ATLAS - Three commands to start analyzing your metagenome data
https://metagenome-atlas.github.io/
BSD 3-Clause "New" or "Revised" License
376 stars 98 forks source link

median_coverage.h5 ERROR #640

Closed luozhy88 closed 1 year ago

luozhy88 commented 1 year ago

Thank you very much for developing such a useful tool. I have a problem that needs help.The median_coverage.h5 is no rowname(gene name)

filename = "counts/median_coverage.h5" data <- h5read(filename, "data") attributes= h5readAttributes(filename, "data") colnames(data) <- attributes$sample_names

image
SilasK commented 1 year ago

The attributes of hdf5 doesn't allow to store colnames of very large size.

The idea is that the Genename 'Gene0001' is converted to 1, etc. This allows to have a pure matrix of numbers.

What I suggest is to parse your gene annotations e.g. eggnog and transform the 'Gene0001' is converted to 1. I don't know on top of my head how to do this in R but I can try to find a way.

Note: on the master branch I have the option to annotate genecatalog with kegg via dram .

SilasK commented 1 year ago

Just to be shure the code snipped you send worked, isn't it?

luozhy88 commented 1 year ago

Thank you for your advice. It worked.

SilasK commented 1 year ago

@luozhy88 You might want to look at the updated docs on how to read and normalize only a subset of genes. 56154b1