Skip to content

Commit

Permalink
Refactoring for Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
soelmicheletti committed Nov 12, 2024
1 parent 0646413 commit 616b5be
Show file tree
Hide file tree
Showing 23 changed files with 92 additions and 162 deletions.
17 changes: 15 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,20 @@ Package: NetworkDataCompanion
Title: Tools for Analyzing TCGA and GTEx Data
Version: 0.0.0.9000
Authors@R:
person("First", "Last", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "YOUR-ORCID-ID"))
person("Soel", "Micheletti", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-5402-9237"))
person("Chen", "Chen",
email = "",role = "aut", comment = c(ORCID = "0000-0002-8042-7201")),
person("Kate", "Shutta",
email = "",role = "aut", comment = c(ORCID = "0000-0003-0402-3771")),
person("Panagiotis", "Mandros", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0009-0008-9638-9722")),
person("Viola", "Fanfani", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-3852-6908")),
person("Jonas", "Fischer", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0000-0000-0000")),
Author: Soel Micheletti
Maintainer: Kate Hoff Shutta <[email protected]>
Description: An R library of utilities for performing analyses on TCGA and GTEx data using the Network Zoo (https://netzoo.github.io).
License: GPL-3
biocViews:
Expand All @@ -16,6 +28,7 @@ Depends:
GenomicDataCommons,
huge,
magrittr,
methods,
org.Hs.eg.db,
presto,
recount,
Expand Down
3 changes: 2 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Generated by roxygen2: do not edit by hand

export("CreateNetworkDataCompanionObject")
export(CreateNetworkDataCompanionObject)
exportClasses(NetworkDataCompanion)
import(methods)
106 changes: 34 additions & 72 deletions R/NetworkDataCompanion.R

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion man/NetworkDataCompanion.Rd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
\name{NetworkDataCompanion}
\alias{NetworkDataCompanion}
\alias{\S4method{NetworkDataCompanion}}

\title{A package for easy and reproducible wrangling of TCGA and GTEx data.}

Expand Down
4 changes: 2 additions & 2 deletions man/convertBetaToM.Rd
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
\name{convertBetaToM}
\alias{convertBetaToM}
\alias{\S4method{convertBetaToM}{NetworkDataCompanion}}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Convert methylation beta values to M-values.}
\description{
This function uses the typical logit base 2 transformation to convert from methylation beta values (in the [0,1] range) to m-values (on the real line). The formula is m = log2(beta/(1-beta)).
}
\usage{
convertBetaToM(methylation_betas)
\S4method{convertBetaToM}{NetworkDataCompanion}(methylation_betas)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
Expand Down
4 changes: 2 additions & 2 deletions man/estimateCellCountsEpiSCORE.Rd
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
\name{estimateCellCountsEpiSCORE}
\alias{estimateCellCountsEpiSCORE}
\alias{\S4method{estimateCellCountsEpiSCORE}{NetworkDataCompanion}}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Run the EpiSCORE algorithm to estimate cell type proportions.}
\description{
This function applies the `constAvBetaTSS` and `wRPC` functions from the EpiSCORE R package within the TCGA data structure. The `wRPC` parameters used are the defaults: `useW=TRUE`, `wth=0.4`, and `maxit=100`.
}
\usage{
estimateCellCountsEpiSCORE(methylation_betas, tissue, array = "450k")
\S4method{estimateCellCountsEpiSCORE}{NetworkDataCompanion}(methylation_betas, tissue, array = "450k")
}
%- maybe also 'usage' for other objects documented here.
\arguments{
Expand Down
21 changes: 3 additions & 18 deletions man/extractSampleAndGeneInfo.Rd
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
\name{extractSampleAndGeneInfo}
\alias{extractSampleAndGeneInfo}
\alias{\S4method{extractSampleAndGeneInfo}{NetworkDataCompanion}}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Extracts experiment-specific information and metadata from ranged summarized experiment object.
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
Extracts experiment-specific information and metadata from ranged summarized experiment object.
}
\usage{
extractSampleAndGeneInfo(expression_rds_obj)
\S4method{extractSampleAndGeneInfo}{NetworkDataCompanion}(expression_rds_obj)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{expression_rds_obj}{A ranged summarized experiment object}
}
\details{
%% ~~ If necessary, more details than the description above ~~
}
\value{
%% ~Describe the value returned
%% If it is a LIST, use
Expand All @@ -26,20 +23,8 @@ extractSampleAndGeneInfo(expression_rds_obj)
\item{rds_sample_info}{metadata about the samples (columns)}
\item{rds_gene_info}{metadata about the genes (rows)}
}
\references{
%% ~put references to the literature/web site here ~
}
\author{
Jonas Fischer (jfischer@hsph.harvard.edu)
}
\note{
%% ~~further notes~~
}

%% ~Make other sections like Warning with \section{Warning }{....} ~

\seealso{
%% ~~objects to See Also as \code{\link{help}}, ~~~
}
\examples{
}
4 changes: 2 additions & 2 deletions man/filterBarcodesIntersection.Rd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
\name{filterBarcodesIntersection}
\alias{filterBarcodesIntersection}
\alias{\S4method{filterBarcodesIntersection}{NetworkDataCompanion}}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Convenience wrapper function for \code{mapBarcodeToBarcode} that applies the function directly to two data frames.
Expand All @@ -8,7 +8,7 @@ Convenience wrapper function for \code{mapBarcodeToBarcode} that applies the fun
This function returns a list of the two argument data frames, intersected, and the second frame ordered to match the first. NOTE: Ordering is done based on columns, which are expected to be named by TCGA barcodes.
}
\usage{
filterBarcodesIntersection(exp1, exp2)
\S4method{filterBarcodesIntersection}{NetworkDataCompanion}(exp1, exp2)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
Expand Down
4 changes: 2 additions & 2 deletions man/filterChromosome.Rd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
\name{filterChromosome}
\alias{filterChromosome}
\alias{\S4method{filterChromosome}{NetworkDataCompanion}}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Filter for genes in a particular chromosome or chromosomes.
Expand All @@ -8,7 +8,7 @@ Filter for genes in a particular chromosome or chromosomes.
This function filters for genes in a particular chromosome or chromosomes.
}
\usage{
filterChromosome(rds_gene_info, chroms)
\S4method{filterChromosome}{NetworkDataCompanion}(rds_gene_info, chroms)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
Expand Down
4 changes: 2 additions & 2 deletions man/filterDuplicatesSeqDepth.Rd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
\name{filterDuplicatesSeqDepth}
\alias{filterDuplicatesSeqDepth}
\alias{\S4method{filterDuplicatesSeqDepth}{NetworkDataCompanion}}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
A function to filter duplicates based on RNA sequencing depth.
Expand All @@ -8,7 +8,7 @@ A function to filter duplicates based on RNA sequencing depth.
This function filters out duplicates based on RNA-seq, keeping the samples with maximum read depth. Returns indices of samples to KEEP.
}
\usage{
filterDuplicatesSeqDepth(expression_count_matrix)
\S4method{filterDuplicatesSeqDepth}{NetworkDataCompanion}(expression_count_matrix)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
Expand Down
4 changes: 2 additions & 2 deletions man/filterDuplicatesSeqDepthOther.Rd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
\name{filterDuplicatesSeqDepthOther}
\alias{filterDuplicatesSeqDepthOther}
\alias{\S4method{filterDuplicatesSeqDepthOther}{NetworkDataCompanion}}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{A version of \code{filterDuplicatesSeqDepth} to handle the case when sequencing depth is not available.
}
Expand All @@ -8,7 +8,7 @@ This function takes a random duplicate if no info is available on sequencing dep
}

\usage{
filterDuplicatesSeqDepthOther(expression_count_matrix, tcga_barcodes)
\S4method{filterDuplicatesSeqDepthOther}{NetworkDataCompanion}(expression_count_matrix, tcga_barcodes)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
Expand Down
4 changes: 2 additions & 2 deletions man/filterGenesByTPM.Rd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
\name{filterGenesByTPM}
\alias{filterGenesByTPM}
\alias{\S4method{filterGenesByTPM}{NetworkDataCompanion}}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Filter genes based on minimum expression level (TPM) across samples.
Expand All @@ -8,7 +8,7 @@ Filter genes based on minimum expression level (TPM) across samples.
Filter all genes which have at least \code{tpm_threshold} TPM scores in at least \code{sample_fraction} of samples.
}
\usage{
filterGenesByTPM(expression_tpm_matrix, tpm_threshold, sample_fraction)
\S4method{filterGenesByTPM}{NetworkDataCompanion}(expression_tpm_matrix, tpm_threshold, sample_fraction)
}
\arguments{
\item{expression_tpm_matrix}{A data frame extracted from a \code{RangedSummarizedExperiment} object containing expression data using the \code{extractSampleAndGeneInfo} function.}
Expand Down
10 changes: 2 additions & 8 deletions man/filterGenesProteins.Rd
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
\name{filterGenesProteins}
\alias{filterGenesProteins}
\alias{\S4method{filterGenesProteins}{NetworkDataCompanion}}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Filtering protein coding genes through an rds object.
}
\description{
Filtering protein coding genes through an rds object.
}
\usage{
filterGenesProteins(rds_gene_info)
\S4method{filterGenesProteins}{NetworkDataCompanion}(rds_gene_info)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{rds_gene_info}{rds info object of genes, usually extracted from row information from recount retrieved rds expression objects.}
}
\details{
%% ~~ If necessary, more details than the description above ~~

}
\value{
Array of indices that correspond to the protein coding genes in the rds gene info table.
Expand All @@ -24,5 +20,3 @@ filterGenesProteins(rds_gene_info)
\author{
Jonas Fischer (jfischer@hsph.harvard.edu)
}
\references{
}
4 changes: 2 additions & 2 deletions man/filterPurity.Rd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
\name{filterPurity}
\alias{filterPurity}
\alias{\S4method{filterPurity}{NetworkDataCompanion}}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Filter samples based on tumor purity.
Expand All @@ -8,7 +8,7 @@ Filter samples based on tumor purity.
This function filters a character vector of TCGA barcodes for tumor purity based on a particular method and threshold.
}
\usage{
filterPurity(TCGA_barcodes, method="ESTIMATE", threshold=.6)
\S4method{filterPurity}{NetworkDataCompanion}(TCGA_barcodes, method="ESTIMATE", threshold=.6)
}
\arguments{
\item{TCGA_barcodes}{Character vector of TCGA barcodes that the user wishes to filter based on tumor purity.}
Expand Down
4 changes: 2 additions & 2 deletions man/filterSampleType.Rd
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
\name{filterSampleType}
\alias{filterSampleType}
\alias{\S4method{filterSampleType}{NetworkDataCompanion}}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Filter samples based on sample type.
}
\description{This function filters samples based on TCGA sample types.
}
\usage{
filterSampleType(TCGA_barcodes, types_of_samples)
\S4method{filterSampleType}{NetworkDataCompanion}(TCGA_barcodes, types_of_samples)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
Expand Down
4 changes: 2 additions & 2 deletions man/filterTumorType.Rd
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
\name{filterTumorType}
\alias{filterTumorType}
\alias{\S4method{filterTumorType}{NetworkDataCompanion}}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Filter samples based on tumor type.
}
\description{This function filters samples based on tumor type. Some examples are: "Primary Tumor", "Solid Tissue Normal", "Primary Blood Derived Cancer - Peripheral Blood". This function is particularly useful for excluding normal samples from analyses.
}
\usage{
filterTumorType(TCGA_barcodes, type_of_tumor, rds_info)
\S4method{filterTumorType}{NetworkDataCompanion}(TCGA_barcodes, type_of_tumor, rds_info)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
Expand Down
4 changes: 2 additions & 2 deletions man/geneNameToENSG.Rd
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
\name{geneNameToENSG}
\alias{geneNameToENSG}
\alias{\S4method{geneNameToENSG}{NetworkDataCompanion}}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Convert from gene name to Ensembl stable id.
}
\description{Given an input character vector of gene names, this function converts them to Ensembl stable IDs. Note from \url{https://useast.ensembl.org/Help/Faq?id=488}: "An Ensembl stable ID consists of five parts: ENS(species)(object type)(identifier).(version)."}

\usage{
geneNameToENSG(gene_names, version = FALSE)
\S4method{geneNameToENSG}{NetworkDataCompanion}(gene_names, version = FALSE)
}
\arguments{
\item{gene_names}{Character vector of gene names.}
Expand Down
4 changes: 2 additions & 2 deletions man/getGeneInfo.Rd
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
\name{getGeneInfo}
\alias{getGeneInfo}
\alias{\S4method{getGeneInfo}{NetworkDataCompanion}}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Retrieve a variety of gene information based on gene name or Ensemble stable ID.
}
\description{ This function uses the \code{gene_mapping} attribute of the NetworkDataCompanion object to provide information on \code{seqid}, \code{source},\code{start},\code{end},\code{strand}, \code{gene_id}, \code{gene_name}, \code{gene_type}, and \code{gene_id_no_ver}.
}
\usage{
getGeneInfo(gene_names_or_ids)
\S4method{getGeneInfo}{NetworkDataCompanion}(gene_names_or_ids)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
Expand Down
8 changes: 2 additions & 6 deletions man/logCPMNormalization.Rd
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
\name{logCPMNormalization}
\alias{logCPMNormalization}
\alias{\S4method{logCPMNormalization}{NetworkDataCompanion}}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Function to compute CPM values from raw counts.
}
\description{
This function computes CPM values from raw expression counts using the edgeR package as a backend.
}
\usage{
logCPMNormalization(exp_count_mat)
\S4method{logCPMNormalization}{NetworkDataCompanion}(exp_count_mat)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{exp_count_mat}{Matrix or data.frame of raw expression counts.}
}
\details{
%% ~~ If necessary, more details than the description above ~~

}
\value{
\item{counts}{The original count matrix passed as argument to this function.}
Expand Down
4 changes: 2 additions & 2 deletions man/logTPMNormalization.Rd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
\name{logTPMNormalization}
\alias{logTPMNormalization}
\alias{\S4method{logTPMNormalization}{NetworkDataCompanion}}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Function for within-array normalization of a RangedSummarizedExperiment object with log transcripts per million (TPM) normalization.
Expand All @@ -9,7 +9,7 @@ Returns a named list with raw counts (useful for duplicate filtering based on se
and the actual log TPM. A pseudocount of 1 is added to each TPM value for this function, so returned "log TPM" values actually correspond to log(TPM + 1).
}
\usage{
logTPMNormalization(expression_rds_obj)
\S4method{logTPMNormalization}{NetworkDataCompanion}(expression_rds_obj)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
Expand Down
11 changes: 2 additions & 9 deletions man/mapBarcodeToBarcode.Rd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
\name{mapBarcodeToBarcode}
\alias{mapBarcodeToBarcode}
\alias{\S4method{mapBarcodeToBarcode}{NetworkDataCompanion}}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Helper function for mapping two sets of TCGA barcodes to each other.
}
Expand All @@ -13,26 +13,19 @@ There are 4 different pieces of information returned in a named list that are al
The same information is provided for \code{bc2}.
}
\usage{
mapBarcodeToBarcode(bc1,bc2)
\S4method{mapBarcodeToBarcode}{NetworkDataCompanion}(bc1,bc2)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{bc1}{Character vector of barcodes in the first set.}
\item{bc2}{Character vector of barcodes in the second set.}
}
\details{
%% ~~ If necessary, more details than the description above ~~

}
\value{
\item{is_inter1}{Boolean vector of the same length as \code{bc1} that indicates which elements of \code{bc1} are present in \code{bc2}.}
\item{idcs1}{Integer vector of the same length as \code{bc1} that indicates where to find each barcode of \code{bc1} in \code{bc2}, returning \code{NA} if there is no match. That is, \code{idcs1[i] != NA}, then \code{bc1[i] == bc2[idcs1[i]]}}
\item{is_inter2}{Boolean vector of the same length as \code{bc2} that indicates which elements of \code{bc2} are present in \code{bc1}.}
\item{idcs2}{Integer vector of the same length as \code{bc2} that indicates where to find each barcode of \code{bc2} in \code{bc1}, returning \code{NA} if there is no match. That is, \code{idcs2[i] != NA}, then \code{bc2[i] == bc1[idcs2[i]]}.}
}
\references{
%% ~put references to the literature/web site here ~
}
\author{
Jonas Fischer (jfischer@hsph.harvard.edu)
}
Expand Down
Loading

0 comments on commit 616b5be

Please sign in to comment.