joey711 / phyloseq

phyloseq is a set of classes, wrappers, and tools (in R) to make it easier to import, store, and analyze phylogenetic sequencing data; and to reproducibly share that data and analysis with others. See the phyloseq front page:
http://joey711.github.io/phyloseq/
584 stars 187 forks source link

Rename data functions for consistency, and "taxa" instead of "species" #136

Closed joey711 closed 12 years ago

joey711 commented 12 years ago

Old name New Name

(Accessors) getSpecies get_taxa getSamples get_samples getTaxa get_taxa_unique getVariable get_variable nsamples nsamples nspecies ntaxa rank.names rank_names sample.names sample_names species.names taxa_names sampleSums sample_sums speciesSums taxa_sums sample.variables sample_variables speciesAreRows taxa_are_rows otuTable otuTable taxTab taxTable tre tree samData samData

(Processors) merge_phyloseq merge_phyloseq merge_samples merge_samples merge_species merge_taxa tipglom tip_glom taxglom tax_glom transformSampleCounts transform_sample_counts filterfunSample filterfun_sample genefilterSample genefilter_sample
prune_species prune_taxa subset_species subset_taxa subset_samples subset_samples

joey711 commented 12 years ago

Progress Change log, changes first applied to the name_revisions branch, not master.

Accessors

getSpecies get_taxa Done. getSamples get_sample Done. getTaxa get_taxa_unique Done. getVariable get_variable Done. nsamples nsamples no change. nspecies ntaxa Done. rank.names rank_names Done. sample.names sample_names Done. species.names taxa_names Done. sampleSums sample_sums Done. speciesSums taxa_sums Done. sample.variables sample_variables Done. speciesAreRows taxa_are_rows Done. otuTable otu_table Done. Big one. taxTab tax_table Done. tre phylo_tree Done... quite complicated because the three-letter word "tre" shows up in many contexts in code/doc If there's a bug introduced, it might be this one... samData sam_data Done. sampleData sample_data Done.

Done with accessors. Need to pass check...

Woops, need to update the example data files, as they have the old slot names, class names...

Still working on revising example data to reflect new class names (by re-building the example data).

The following commit contains the updates to this point: 14f70a3ef3582ca8d479bd2676af9d2bec6d72f4

Note that some other functions still need to be re-named as well to complete the table.

joey711 commented 12 years ago

old name new name readTree read_tree Done. sample_variables sample_variables Already done. No variable.names function in phyloseq-package.

joey711 commented 12 years ago

Progress Change log, changes first applied to the name_revisions branch, not master (continued). phyloseq ver 1.1.40

Processing functions

merge_phyloseq merge_phyloseq Done. No change.

merge_samples merge_samples Done. no change.

merge_species merge_taxa Done.

tipglom tip_glom Done.

taxglom tax_glom Done.

transformSampleCounts transform_sample_counts Done.

filterfunSample filterfun_sample Done.

genefilterSample genefilter_sample
Done.

prune_species prune_taxa Done.

subset_species subset_taxa Done.

subset_samples subset_samples No change.

joey711 commented 12 years ago

Still working on this. Updated data files helps R CMD check phyloseq get much further. Some issues in the tests. Need to figure out how to reliably make the name-changes still backward compatible...

joey711 commented 12 years ago

Trouble with aliases.

Got the following warning from R CMD check phyloseq:

Need to get the aliases to build properly on the roxygen side, and also check if there are any deprecated functions that you expected to be an available object that wasn't.

Sweave-building of vignette PDFs

(note, the R code ran without problem prior to this warning)

See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ...
sis.tex:247: LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ...
sis.tex:250: LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ...
sis.tex:250: LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ...
sis.tex:252: LaTeX Error: Not in outer par mode.

joey711 commented 12 years ago

Almost done. Vignettes and filter_taxa fixed:

36b13ad4f946a153f5967e08dbeab111b12f14bd

Proper aliases for deprecated (renamed) functions

filterfunSample

genefilterSample

getTaxa

getVariable

rank.names

sample.variables

sampleSums

samplesums

speciesSums

speciessums

taxglom

joey711 commented 12 years ago

This appears fixed in the latest commit. Need to do final checks...

joey711 commented 12 years ago

95bba90b3050ced08f001d24482c3f26eb7bf2db

joey711 commented 12 years ago

Added deprecated assignment functions following name change, with aliases.

db09ecd117012ce553646ea4fd5a4519ba1a93ad

This branch should be merged into master. Lingering issue is the new knitr-woven analysis vignette. Need to fix issues.

joey711 commented 12 years ago

This is now closed by the following pull-request and merge:

https://github.com/joey711/phyloseq/pull/138

marsfro commented 4 years ago

Hello! Couldn't you help me! I can't to add sample data to my phyloseq object from biom-kraken file:

sample_names(com2@sam_data) NULL

com2 phyloseq-class experiment-level object otu_table() OTU Table: [ 1111 taxa and 3 samples ] tax_table() Taxonomy Table: [ 1111 taxa by 7 taxonomic ranks ] phy_tree() Phylogenetic Tree: [ 1111 tips and 1110 internal nodes ]