get_protein_table: Counts the Proteins in ScanMetadata and generate "Protein...

View source: R/get_protein_table.R

get_protein_tableR Documentation

Counts the Proteins in ScanMetadata and generate "Protein Table" object

Description

A simple function which returns a table of protein counts from ScanMetadata

Usage

get_protein_table(
  ScanMetadata,
  FASTAPath,
  QValueMaximum = NULL,
  ScoreMaximum = NULL,
  RemoveContaminants = TRUE
)

Arguments

ScanMetadata

Object of the scan_metadata class from get_scan_metadata. Required.

FASTAPath

File path to the database file, in FASTA format. Required.

QValueMaximum

A maximum q-value to filter proteins on. The values range from 0-1, and NULL means no filter is applied. Default is NULL.

ScoreMaximum

A maximum score to filter proteins on. The values range from 0-1. Remember most scores are small (i.e. 1e-20 or smaller). NULL means no filter is applied. Default is NULL.

RemoveContaminants

A True/False to indicate whether contaminants will be removed or not. Default is TRUE.

Details

The data.table outputted by this function contains 5 columns of data from the ID file.

Protein The name of the protein (protein ID) from the ID file
Number of Peptides The count of peptides identified for that protein.
Median Q Value The median Q Value for the peptides identified for that protein.
Median Score The median score for the peptides identified for that protein.
Description The protein's description as provided in the ID file.

Objects of the class "protein_table" contain attributes of the input variables: QValueMaximum, ScoreMaximum, and RemoveContaminants

Examples

## Not run: 

# Test bottom up data. Note that for these example files, the same FASTA file
# has been used for both bottom-up and top-down
tmpdir <- tempdir()
download.file("https://raw.githubusercontent.com/EMSL-Computing/PSpecteR/master/pspecter_container/TestFiles/QC_Shew.fasta",
              file.path(tmpdir, "QC_Shew.fasta"))

ProteinTable1 <- get_protein_table(BU_ScanMetadata, FASTAPath = file.path(tmpdir, "QC_Shew.fasta"))
ProteinTable2 <- get_protein_table(BU_ScanMetadata, FASTAPath = file.path(tmpdir, "QC_Shew.fasta"), QValueMaximum = 0.1, ScoreMaximum = 0.00003)


## End(Not run)



EMSL-Computing/pspecterlib documentation built on Jan. 28, 2024, 8:13 p.m.