Write a GCT file with timewise differential analysis t-scores as values and
human flanking sequences as IDs. rat_to_human_ptm_map
is used to map from rat
to human phosphosites, and a human protein FASTA file is used to add human
flanking sequences.
Usage
prepare_ptmsea_input(
tissue = NULL,
fasta = NULL,
rat_to_human_ptm_map = MotrpacRatTraining6moData::RAT_TO_HUMAN_PHOSPHO,
outdir = ".",
outfile_prefix = NULL,
input = NULL,
cast_vars = c("sex", "comparison_group")
)
Arguments
- tissue
character, tissue abbreviation, one of MotrpacRatTraining6moData::TISSUE_ABBREV. Must be specified if cusotm
input
is not provided.- fasta
Biostrings::XStringSet object returned from reading in a human protein FASTA file with
Biostrings::readAAStringSet()
. Names of the Biostrings::XStringSet object should be set to the human protein accession, e.g., "Q96QG7". If not specified, the result ofload_uniprot_human_fasta()
is used, which returns the version of the UniProt human protein FASTA used in the manuscript.- rat_to_human_ptm_map
data frame with columns "ptm_id_rat_refseq" and "ptm_id_human_uniprot" used to map PTMs from rat to human. Default: MotrpacRatTraining6moData::RAT_TO_HUMAN_PHOSPHO
- outdir
character, output directory for GCT file. The directory is created if it does not already exist. Current directory by default.
- outfile_prefix
character, prefix for output GCT file. By default, this prefix includes the specified tissue and current date. Must be specified for custom input data.
- input
optional data frame if the user wants to perform this analysis for a custom set of differential analysis results. Required columns are "feature_ID", "tscore", and
cast_vars
.- cast_vars
character vector of column names in the differential analysis results that are used to convert the table from long to wide format, with t-scores as the value variable. See
tidyr::pivot_wider()
for more details. Default: "sex", "comparison_group"
Examples
if (FALSE) { # \dontrun{
# Using existing differential analysis results
prepare_ptmsea_input("HEART", outdir="/tmp")
# Using a "custom" input
res = combine_da_results(tissues = "HEART", assays = "PHOSPHO")
# add dummy column
prepare_ptmsea_input(input=res, outdir="/tmp", outfile_prefix="HEART_PHOSPHO")
} # }