Closed bschilder closed 2 years ago
Some notes on the PR:
Increment major, e.g. 1.0.0, for a major release. This is best reserved for changes that are not backward compatible and that are likely to affect many users. Going from 0.b.c to 1.0.0 typically indicates that your package is feature complete with a stable API.
Remotes: github::NathanSkene/EWCE
, please make a note to remove this once the new EWCE version goes live in Apr/May.# Run cell-type enrichment analyses
give information on what MAGMA.Celltyping::celltype_associations_pipeline
is doing at a high-level for new users. Currently only the code is given with no explanation.# Plot results
and the two subheadings. I get this is like the quickstart vignette but I think some more information is needed.There can only be one "cre" (building the package throws an error otherwise). Keeping that as Nathan, since he both created it and will be the one to continue maintaining it after I leave the lab.
Increment major, e.g. 1.0.0, for a major release. This is best reserved for changes that are not backward compatible and that are likely to affect many users. Going from 0.b.c to 1.0.0 typically indicates that your package is feature complete with a stable API.
Remotes: github::NathanSkene/EWCE
, please make a note to remove this once the new EWCE version goes live in Apr/May. Noted here.
Is this a requirement for CRAN, or a suggestion? Def good practice, but just trying to figure out what to prioritize
[x] R/bin_expression_into_quantiles.R
[x] R/bin_specificity.R
[x] R/bin_specificityDistance_into_quantiles.R
[x] R/check_access.R
[x] R/check_celltype_names.R
[x] R/check_enrichment_mode.R
[x] R/check_entrez_genes.R
[x] R/check_quantiles.R
[x] R/create_genesets.R
[x] R/decompress.R
[x] R/find_GenesOut_files.R
[x] R/fix_ctd.R
[x] R/fix_path.R
[x] R/get_actual_path.R
[x] R/get_celltype_dict.R
[x] R/get_example_magma_files.R
[x] R/get_os.R
[x] R/get_top10percent.R
[x] R/github_download_files.R
[x] R/import_magma_files_metadata.R
[x] R/invert_dict.R - Is this necessary to have as a function, it is just a one liner?
[x] R/load_rdata.R
[x] R/magma_check.R
[x] R/magma_check_version_match.R
[x] R/magma_create_symlink.R
[x] R/magma_download_binary.R
[x] R/magma_executable_select.R
[x] R/magma_find_executable.R
[x] R/magma_installation_info.R
[x] R/magma_installed.R
[x] R/magma_installed_version.R
[x] R/magma_links.R
[x] R/magma_links_gather.R
[x] R/magma_links_query.R
[x] R/magma_os_suffix.R
[x] R/magma_read_gsa_out.R
[x] R/magma_read_sets_out.R
[x] R/messager.R
[x] R/normalise_mean_exp.R
[x] R/set_permissions.R
[x] R/use_distance_to_add_expression_level_info.R
[x] R/magma_geneset_test.r - This script should be deleted
[x] R/utils.r seems to do roughly the same as R/messager.R, delete utils.r and update any calls
[x] R/message_cmd.R - Is this necessary to have as a function, it is just a one liner?
As a rule of mine, any bit of code you use more than once should be a function (even small ones). That way it is always consistent across usage.
Still trying to figure out this function. Need to have a discussion with @NathanSkene about this.
Wrote this and then realized it takes too long to run. Keeping in case we decide to use it later, and also just to have some means of checking whether it works (even if manually).
40% currently. Getting this up is def a longer-term goal of mine, but I can't sink too much time into this atm. Also, some tests take an extremely long time (thus why i hashed out test-map_snps_to_genes
). Added Issue here.
# Run cell-type enrichment analyses
give information on what MAGMA.Celltyping::celltype_associations_pipeline
is doing at a high-level for new users. Currently only the code is given with no explanation. # Plot results
and the two subheadings. I get this is like the quickstart vignette but I think some more information is needed.Just on "There can only be one "cre" (building the package throws an error otherwise). Keeping that as Nathan, since he both created it and will be the one to continue maintaining it after I leave the lab." - The bioconductor standard is that the maintainer should be the "cre" so that should be you. I would put Nathan as the aut only since having two cre throws an error. This is consistent with the labs other packages so I think we should follow it here too (I'm down as cre for EWCE/MungeSumstats). I know you will leave the lab after your PhD but that is a while away yet so I think we can update the cre when the time comes!
MAGMA.Celltyping 2.0.0
MAGMA.Celltyping
was revamped to meet CRAN standards, automatically install MAGMA, and take any species as input.New features
NEWS.md
file to track changes to the package.magma_install
function; stores binaries inMAGMA.Celltyping
-specific cache dir. Added various support functions to make this possible and ensure correct version is being used.magma_uninstall
function to remove one or all MAGMA binaries.MAGMA.Celltyping
to install even if MAGMA is not installed. Instead, check at the beginning of functions that require MAGMA usingmagma_check
.magma_links_stored
: Include built-in metadata with links to all MAGMA versions with parsed version numbers, OS, and which is the latest version.magma_run
which finds the requested version of MAGMA and uses it.magma_cmd
function.get_sub_SNP_LOC_DATA
.Deprecated
function and removing all other internal code:get_genomebuild_for_sumstats
build_snp_location_tables
format.sumstats.for.magma
format_sumstats_for_magma_macOnly
standardise.sumstats.column.headers
standardise.sumstats.column.headers.crossplatform
sumstatsColHeaders
from data, as it was only used in now-deprecated functions.calculate.celltype.enrichment.probabilities.wtLimma
-->calculate_celltype_enrichment_limma
calculate.conditional.celltype.enrichment.probabilities.wtLimma
-->calculate_conditional_celltype_enrichment_limma
piggyback
-based functions:get_ctd
: CellTypeDatasetsget_example_gwas
: GWAS summary statsget_genomeLocFile
: NCBI gene coordinate references.MungeSumstats
). Accessed byget_example_gwas
.get_genome_ref
prepare_quantile_groups
reshape
cowplot
SNPlocs.Hsapiens.dbSNP144.GRCh37
SNPlocs.Hsapiens.dbSNP144.GRCh38
hgnc2entrez
with improvedhgnc2entrez_ortohgene
fromorthogene::all_genes
. Benchmarked to confirm that the latter increases the number of genes that can be converted.output_species
(default: "human") usingorthogene
.MungeSumstats
: https://github.com/neurogenomics/MAGMA_Files_Publicmagma_files_metadata
: Built-in table of all pre-processed MAGMA files currently in the database.import_magma_files
.calculate_celltype_associations(magma_dir="<folder_containing_magma_files>")
This function is also used for downloading MAGMA files in examples/unit tests.@title
,@description
,@param
,@return
for all exported (and many internal) functions.@examples
for all exported (and many internal) functions.@importFrom
orrequireNamespace
for all imports functions.1:10
syntax.upstream_kb = 35
downstream_kb = 10
get_genome_ref(population = "<population_name>")
EWCE
features in bschilder_dev branch:EWCE::standardise_ctd
celltype_associations_pipeline
, which lets users specify which test they want to run with arguments, including:calculate_celltype_associations
(Linear mode)calculate_celltype_associations
(Top10% mode)calculate_conditional_celltype_associations
celltype_associations_pipeline
across multiple cores.normalise_mean_exp
bin_specificityDistance_into_quantiles
bin_expression_into_quantiles
get_driver_genes
calculate_celltype_enrichment_limma
adjust_zstat_in_genesOut
Bug fixes
usethis
call from code.library
calls from code.data.frame
suppressWarnings
calls and resolve the underlying issues instead.utils
as Suggest.plot_celltype_associations
, first reported here.prepare_quantile_groups
so that it's consistent with howEWCE
compute specificity quantiles. Ensures that all celltypes (columns) have exactly the same number of quantiles, which was not the case before.