differential_SNP_tcga: Do difference analysis of SNP data downloaded from...

View source: R/SNP.R

differential_SNP_tcgaR Documentation

Do difference analysis of SNP data downloaded from TCGAbiolinks

Description

Do difference analysis of SNP data downloaded from TCGAbiolinks

Usage

differential_SNP_tcga(snpData, sampleGroup, combineMethod = NULL)

Arguments

snpData

data.frame of SNP data downloaded from TCGAbiolinks

sampleGroup

vector of sample group

combineMethod

Method of combining the pvalue of multiple snp in a gene.

Value

data.frame

Examples


library(TCGAbiolinks)
query <- GDCquery(
    project = "TCGA-CHOL",
    data.category = "Simple Nucleotide Variation",
    access = "open",
    legacy = FALSE,
    data.type = "Masked Somatic Mutation",
    workflow.type = "Aliquot Ensemble Somatic Variant Merging and Masking"
)
GDCdownload(query)
data_snp <- GDCprepare(query)
samples <- unique(data_snp$Tumor_Sample_Barcode)
sampleGroup <- sample(c("A", "B"), length(samples), replace = TRUE)
names(sampleGroup) <- samples
pvalue <- differential_SNP_tcga(snpData = data_snp, 
    sampleGroup = sampleGroup)

# use demo data
snpDf <- matrix(sample(c("mutation", NA), 100, replace = TRUE), 10, 10)
snpDf <- as.data.frame(snpDf)
sampleGroup <- sample(c("A", "B"), 10, replace = TRUE)
result <- differential_SNP(snpDf, sampleGroup)

huerqiang/GeoTcgaData documentation built on March 21, 2024, 1:42 a.m.