onegroup_only: Proteins that are only expressed in a given group

View source: R/filterProteins.R

onegroup_onlyR Documentation

Proteins that are only expressed in a given group

Description

This function outputs a list of proteins that are only expressed (present) in one user-specified group while not expressed (completely absent) in another user-specified group.

Usage

onegroup_only(
  raw_df,
  abs_group,
  pres_group,
  set_na = 0.34,
  save = FALSE,
  file_path = NULL
)

Arguments

raw_df

A raw_df object (output of create_df)

abs_group

Name of the group in which proteins are not expressed.

pres_group

Name of the group in which proteins are expressed.

set_na

The percentage of missing data allowed in pres_group. Default is 0.34 (one third of the samples in the group).

save

Logical. If TRUE (default), it saves the output in a text file named "Group_pres_group_only.txt."

file_path

A string containing the directory path to save the file.

Details

Note: onegroup_only function assumes that column names in the raw_df object provided as df follow "Group_UniqueSampleID" notation. (Use head(raw_df) to check the structure of your raw_df object.)

  • Given a pair of groups, onegroup_only function finds proteins that are only expressed in pres_group while completely absent or not expressed in abs_group.

  • A text file containing majority protein IDs will be saved in a temporary directory if file_path is not specified.

Value

A list of majority protein IDs.

Author(s)

Chathurani Ranathunge

Examples

# Generate a raw_df object with default settings. No technical replicates.
raw_df <- create_df(
prot_groups = "https://raw.githubusercontent.com/caranathunge/promor_example_data/main/pg1.txt",
exp_design = "https://raw.githubusercontent.com/caranathunge/promor_example_data/main/ed1.txt"
)

## Find the proteins only expressed in group L, but absent in group H.
onegroup_only(raw_df, abs_group = "H",
pres_group = "L")


promor documentation built on July 26, 2023, 5:39 p.m.