-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAGMA.Celltyping
: bschilder_dev upgrade
#93
Conversation
…magma files. Allow calculate_conditional_geneset_enrichment to run in any species an d handle version differences in magma file formats
…gs to resolve Windows GHA error.
…alize magma_x paths for Windows
Some notes on the PR:
|
DESCRIPTION
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.
Noted here. Add function documentationIs this a requirement for CRAN, or a suggestion? Def good practice, but just trying to figure out what to prioritize
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. README.md
Unit tests
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 Vignettes
|
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 in
MAGMA.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 using
magma_check
.magma_links_stored
: Include built-in metadata with links to all MAGMAversions with parsed version numbers, OS, and which is the latest version.
magma_run
which finds the requested version ofMAGMA 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-deprecatedfunctions.
test file names being too long:
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
.instead of having the user run them:
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 latterincreases the number of genes that can be converted.
Now automatically converted to
output_species
(default: "human") usingorthogene
.that have been munged with
MungeSumstats
: https://github.com/neurogenomics/MAGMA_Files_Publicmagma_files_metadata
: Built-in table of all pre-processed MAGMA filescurrently in the database.
import_magma_files
.(instead of requiring the GWAS summary stats); e.g.
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
population-specific LD panels from 1KG with
get_genome_ref(population = "<population_name>")
as dense matrices when computing quantiles/normalization.
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.