prune_snps: prune_snps.R

Description Usage Arguments Value

View source: R/prune_snps.R

Description

We can only do set-based tests with SNPs that are in both the ped file (to estimate correlation) and in the summary statistics file (obviously because we need the summary statistic). This function tells us which SNPs are indeed in both. Use only with one region (contiguous length on one chromosome) at a time. Make sure you have the PLINK binary in your working directory!

Usage

1
2
prune_snps(Snum, aID, part = NULL, fname_root, prune_R2, temp_Gmat,
  temp_Gmat_record, checkpoint)

Arguments

Snum

The pruned file will be name S[Snum]_[aID].prune.out. The Snum and aID parameters allow you to ensure that your pruned files do not overwrite each other if you have many jobs running at once.

aID

The pruned file will be name S[Snum]_[aID].prune.out. The Snum and aID parameters allow you to ensure that your pruned files do not overwrite each other if you have many jobs running at once.

part

For run_pathwayanal_part.R the name will be S[Snum]_[aID]_[part].prune.out. Default is NULL.

fname_root

The root of our .ped and .info files downloaded from 1000G, used to remove them at the end.

prune_R2

Prune all SNPs that have pairwise correlation greater than this threshold.

temp_Gmat

The genotypes of the SNPs, will remove columns in accordance with PLINK pruning.

temp_Gmat_record

Info on the SNPs, will remove rows in accordance with PLINK pruning.

checkpoint

A boolean, if TRUE, print out diagnostic/error messages.

Value

A list with the elements temp_Gmat (containing the genotypes at each qualifying SNP) and temp_Gmat_record (containing the info on SNPs), or 1 if nothing to return.


ryanrsun/LungCancerAssoc documentation built on May 24, 2019, 7:26 p.m.