Calculate the ATAC-to-RNA / Peak-to-Gene links.

getPeak2Gene(
  atac_matrix,
  rna_matrix,
  peak_annotation,
  max_distance = 20000,
  N_permutation = 10000,
  save_path = NA
)

Arguments

atac_matrix

The normalized ATAC-seq data frame obtained by **quantification**.

rna_matrix

The normalized RNA-seq data frame. Note: The RNA and ATAC matrix have the same column names and orders.

peak_annotation

Peak annotation obtained by **plotPDI**. The file suffix: _Proximal_Distal_Intragenic_Annotation.tsv

max_distance

The max distance (bp) around the gene to calculate the correlations. If you set 20000, it will find the peak-to-gene within 20kb upstream and downstream of the gene. Default: 20000.

N_permutation

Simulate how many times pseudo-data to measure the P value of each peak-to-gene. Default: 10000.

save_path

The path to save the result.

Examples

  getPeak2Gene(atac_matrix="~/zhutao/CAT/ATAC_norm_quant.tsv", rna_matrix="~/zhutao/CAT/RNA_norm_quant.tsv",
                         tss_file="~/nip_tss.bed", peak_annotation="~/zhutao/CAT/peak_anno.tsv", max_distance=20000, N_permutation=10000)
#> Error in getPeak2Gene(atac_matrix = "~/zhutao/CAT/ATAC_norm_quant.tsv",     rna_matrix = "~/zhutao/CAT/RNA_norm_quant.tsv", tss_file = "~/nip_tss.bed",     peak_annotation = "~/zhutao/CAT/peak_anno.tsv", max_distance = 20000,     N_permutation = 10000): unused argument (tss_file = "~/nip_tss.bed")