join_targets: Add miRNA targets from an xlsx-file to a data frame

Description Usage Arguments Details Value See Also

View source: R/join_targets.R

Description

Add miRNA targets from an external xlsx-file to a data frame.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
join_targets(
  df,
  excel_file,
  col.pmid.excel,
  col.target.excel,
  col.mir.excel = NULL,
  col.pmid.df = PMID,
  col.topic.df = NULL,
  filter_na = TRUE,
  stem_mir_excel = TRUE,
  reduce = FALSE
)

Arguments

df

Data frame containing PubMed-IDs that the miRNA targets shall be joined to.

excel_file

xlsx-file. xlsx-file containing miRNA targets and PubMed-IDs.

col.pmid.excel

String. Column containing PubMed-IDs of the excel_file.

col.target.excel

String. Column containing targets of the excel_file.

col.mir.excel

String. Optional. Column containing miRNAs of the excel_file. Needed if reduce = TRUE.

col.pmid.df

Symbol. Column containing PubMed-IDs in df.

col.topic.df

Symbol. Optional. Only important if reduce = TRUE. If given, adds a topic column to the reduced data.frame.

filter_na

Boolean. If filter_na = TRUE, drops all rows containing NA in column Target.

stem_mir_excel

Boolean. If stem_mir_excel = TRUE, miRNA names provided in col.mir.excel are reduced to their stem, e.g. "miR-20a-5p" becomes "miR-20".

reduce

Boolean. If reduce = FALSE, adds a new column containing miRNA targets to df. If reduce = TRUE, adds two new columns containing miRNA names and miRNA targets to df. All other columns except for the PubMed-ID column and (optionally) the topic column are dropped.

Details

Add miRNA targets from an external xlsx-file to a data frame. To add the targets to the data frame, the xlsx-file and the data frame need to have one column in common, such as PubMed-IDs. join_targets() can return two different data frames, regulated by reduce:

  1. If reduce = FALSE, join_targets() adds targets from an excel-file to the data frame in a new column. These targets then correspond to the targets determined in the research paper, but do not necessarily correspond to the miRNA names mentioned in the abstract.

  2. If reduce = TRUE, join_targets() adds targets from an xlsx-file to the data frame in a new column. However, an altered data frame is returned, containing the PubMed-IDs, targets, and miRNAs from the excel-file. For reduce = TRUE to work, the xlsx-file provided must contain a column with miRNA names.

Value

Data frame containing miRNA targets.

See Also

Other target functions: count_target(), join_mirtarbase(), plot_target_count(), plot_target_mir_scatter()


JulFriedrich/miRetrieve documentation built on Sept. 20, 2021, 11:37 p.m.