You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be inconsistent handling of sample names by various phyloseq methods. For example,
x<-y<-z<-data.frame(var1=letters[1:3], var2=7:9)
rownames(x) <- c("1", "2", "3")
rownames(y) <- c("s1", "2", "3")
rownames(z) <- c("3", "2", "1")
sample_data(x)
#> var1 var2#> sa1 a 7#> sa2 b 8#> sa3 c 9
sample_data(y)
#> var1 var2#> s1 a 7#> 2 b 8#> 3 c 9
sample_data(y) %>% prune_samples(c("2", "3"), .)
#> var1 var2#> 2 b 8#> 3 c 9
sample_data(z)
#> var1 var2#> 3 a 7#> 2 b 8#> 1 c 9
In addition, some phyloseq functions cause numerical sample names to be prepended with an "X", as would be done by make.names(). This happens in the results of diversity().
The text was updated successfully, but these errors were encountered:
It looks like the reason that only the first case results in dummy sample names is that phyloseq checks if the row names are as.character(1:n), and if so decides that sample names are missing and sets the names to "sa1", "sa2", etc.
There seems to be inconsistent handling of sample names by various phyloseq methods. For example,
In addition, some phyloseq functions cause numerical sample names to be prepended with an "X", as would be done by
make.names()
. This happens in the results ofdiversity()
.The text was updated successfully, but these errors were encountered: