Open davetang opened 6 years ago
Encountered the same issue, I solved it by expliciting the name of the column name using the col.names
argument (row.names
if you're querying for gene-related attributes).
For instance, to retrieve the cell names and clusters as a dataframe, you would write::
df = lfile$get.attribute.df(MARGIN = 2, attribute.names = c("CellID", "Clusters"), col.names = "CellID")
Hope it helps !
I have the same issue here...
> names(lfile$row.attrs)
[1] "Accession" "Gene" "_LogCV"
[4] "_LogMean" "_Selected" "_Total"
[7] "_Valid" "gene_dispersion" "gene_dispersion_scaled"
[10] "gene_means" "var_genes"
>
> attrs <- names(lfile$row.attrs)
> attr.df <- lfile$get.attribute.df(MARGIN = 1, attribute.names = attrs)
Error in `[[.H5File`(self, paste0(attribute.layer, "/", row.names)) :
An object with name row_attrs/gene_names does not exist in this group
@davetang @bopekno @yasinkaymaz @ChristophH @andrewwbutler I met the same problem,how do you solve it? And I tried your command,but it didn't work.Can anyone give me some advice? Thanks!
> attrs <- names(lfile$col.attrs)
> tha.meatdata <- lfile$get.attribute.df(MARGIN = 2, attribute.names = attrs)
Error in `[[.H5File`(self, paste0(attribute.layer, "/", col.names)) :
An object with name col_attrs/cell_names does not exist in this group
> df = lfile$get.attribute.df(MARGIN = 2, attribute.names = c("CellID", "Clusters"), col.names = "CellID")
Error in `.rowNamesDF<-`(x, value = value) :
duplicate 'row.names' are not allowed
此外: Warning message:
non-unique values when setting 'row.names': ‘10X50_5_AAGTGACCAAGT-’, ‘10X50_5_ACCGGACTCGCT-’, ‘10X50_5_ACCTTGTCTCTA-’, ‘10X50_5_ACGTCTGGCATT-’, ‘10X50_5_ACTCTGTTACCT-’, ‘10X50_5_ACTTCTGCTCCT-’, ‘10X50_5_CAGTTGCCCTTG-’, ‘10X50_5_CGGAACCTGAGT-’, ‘10X50_5_CTCACTGCCATA-’, ‘10X50_5_CTGAGACATGGT-’, ‘10X50_5_GAAACTTAACGC-’, ‘10X50_5_GAAGACACACAC-’, ‘10X50_5_GACCCTTGGGAG-’, ‘10X50_5_GATAGACAACTG-’, ‘10X50_5_GATATGTAGAAG-’, ‘10X50_5_GCACACAGAGAT-’, ‘10X50_5_GCCATGTCCGTC-’, ‘10X50_5_TCGAACTGCTGA-’, ‘10X50_6_AACACTGAGCAG-’, ‘10X50_6_ACGAACGTGTCA-’, ‘10X50_6_ACTTTGGTTTCT-’, ‘10X50_6_AGAACTTAAGCC-’, ‘10X50_6_AGGATGTTCCGC-’, ‘10X50_6_ATACTGAGGTCT-’, ‘10X50_6_CCAGCTTCCGTC-’, ‘10X50_6_TAGAGAATCTCT-’, ‘10X50_6_TCAACTGCCATA-’, ‘10X50_6_TCAGGAGAAGGC-’, ‘10X50_6_TCCAGAGGTACT-’, ‘10X50_6_TCGAACATCACG-’, ‘10X50_6_TGGATGACCTCC-’, ‘10X50_6_TTAAGAGGGACA-’, ‘10X50_7_AACAGATCAAGC-’, [... truncated]
Thanks for pointing this out, we will work on a fix.
Hi there, I've just run into the same problem as Sophia's. Is there a way to make row.names unique to proceed with get.attribute.df? Best, Lipin
Having the same issue. All of the row attributes are non unique, so I cannot access them!
Hi,
I am also having this issue when trying to extract attributes
Error in `.rowNamesDF<-`(x, value = value) :
duplicate 'row.names' are not allowed
Did anyone find a solution?
For loom files created with velocyto, cell names are called labelled as
CellID
. I think this is why I'm getting an error withget.attribute.df
because it expects the labelcell_names
.