Displaying 20 results from an estimated 94 matches for "snps".
Did you mean:
sdps
2012 Oct 23
1
factor or character
Hi,
The program below work very well.
(snps = c('rs621782_G', 'rs8087639_G', 'rs8094221_T', 'rs7227515_A',
'rs537202_C'))
Selec = todos[ , colnames(todos) %in% snps]
head(Selec)
But, I have a data set with 1.000 columns and I need extract 70 to use
(like snps in command above).
This 70 snps are in a...
2012 Mar 14
3
Needing a better solution to a lookup problem.
...ten me to a better solution.
I have data frame of chromosome/position pairs (along with other data for the location). For each pair I need to determine if it is with in a given data frame of ranges. I need to keep only the pairs that are within any of the ranges for further processing.
Example:
snps<-NULL
snps$CHR<-c("1","2","2","3","X")
snps$POS<-as.integer(c(295,640,670,100,1100))
snps$DAT<-seq(1:length(snps$CHR))
snps<-as.data.frame(snps, stringsAsFactors=FALSE)
snps
CHR POS DAT
1 1 295 1
2 2 640 2
3 2 670...
2013 Nov 08
1
SNPRelate: Plink conversion
Hi,
Following my earlier posts about having problems performing a PCA, I have
worked out what the problem is. The problem lies within the PLINK to gds
conversion.
It seems as though the SNPs are imported as "samples" and in turn, the
samples are recognised as SNPs:
>snpsgdsSummary("chr2L")
Some values of snp.position are invalid (should be > 0)!
Some values of snp.chromosome are invalid (should be finite and >=1)!
Some of snp.allele are not standard! E.g,...
2014 Jul 21
1
Multiple versions of data in a package
...have a solution
that works, but it doesn't seem as simple as it should be from a user's
point of view, nor does it seem robust to errors. What should I do better?
More details:
My package is a relatively simple set of plotting functions, that plot
user supplied data across a number of SNPs from their experiment, and
annotates the plot using some external data. For example, the user supplies
SNP value
A 2
B 1.2
C 7.8
etc
The external datasets will allow me to look up the location of SNPs A,
B, C, ... on the human genome so the user's data can be plotted in
relation to that...
2007 Feb 05
3
RSNPper SNPinfo and making it handle a vector
If I run an analysis which generates statistical tests on many SNPs I would
naturally want to get more details on the most significant SNPs. Directly
from within R one can get the information by loading RSNPer (from
Bioconductor) and simply issuing a command SNPinfo(2073285). Unfortunately,
the command cannot handle a vector and therefore only wants to do one at a...
2011 Apr 18
2
Working with massive matrices in R
Hello,
I'm (eventually) attempting a singular value decomposition of a 3200 x
527829 matrix in R version 2.10.1. The script is as follows:
###---------Begin Script here-------###
library(Matrix)
snps <- 527829 ## Number of SNPs
N <- 3200 ## Sample size
y <- rnorm(N, 100,1) ## simulated phenotype
system.time(
## read in matrix 3200 x 527829
x <- scan("gedi7.raw", what=rep(0,snps), nmax=N*snps, skip=1))
system.time(x <...
2004 Feb 19
1
piece wise application of functions
...uot; "spl.2mb" "spl.5mb"
>
> names(missgp2)
[1] "spl.1mb" "spl.2mb" "spl.5mb"
>
(
In case it matters the functions accept and return one argument:
block.size <- spl.1mb(ic)
)
Then, I have 2 data frames with identical structure:
> snps.missgp
intvl.mb ic
1 1e+06 0.597
2 2e+06 0.504
3 5e+06 0.327
4 1e+07 0.204
>
> strs.missgp
intvl.mb ic
1 1e+06 0.67200
2 2e+06 0.62325
3 5e+06 0.51000
4 1e+07 0.38775
>
I would like to apply the functions on these data frames
piece-wise and create a...
2012 Aug 24
0
A question about GRAMMAR calculations in the FAM_MDR algorithm
...output.txt")
# loading data and bringing in GenABEL format
rawfile="simulation.raw"
convert.snp.ped(pedfile, mapfile, rawfile)
simulation.GenABEL = load.gwaa.data(phenofile = phenofil, genofile =
rawfile, force=F,makemap=F,sort=F)
pedigree=read.table(pedfile)
pedsize=nrow(pedigree)
nsnps=(ncol(pedigree)-6)/2
# minor allele count and handling missing genotype data
allelic = function(k){
geno=pedigree[,(5+2*k):(6+2*k)]
allelic=rowSums(geno==2)-(geno[,1]==0 & geno[,2]==0) # -1 for
missing, 0,1,2 gives count of variant allele
}
# preparing MB-MDR
SNPS = matrix(0,nrow=p...
2011 Jun 21
4
Re; Getting SNPS from PLINK to R
I a using plink on a large SNP dataset with a .map and .ped file.
I want to get some sort of file say a list of all the SNPs that plink is
saying that I have. ANyideas on how to do this?
--
Thanks,
Jim.
[[alternative HTML version deleted]]
2005 Apr 13
1
logistic regression weights problem
Hi All,
I have a problem with weighted logistic regression. I have a number of
SNPs and a case/control scenario, but not all genotypes are as
"guaranteed" as others, so I am using weights to downsample the
importance of individuals whose genotype has been heavily "inferred".
My data is quite big, but with a dummy example:
> status <- c(1,1,1,0,0)
>...
2011 Jun 21
1
Getting SNPS from PLINK to R
snpMatrix package is quite nice (read.plink())
2006 Apr 06
4
Reshaping genetic data from long to wide
...only reason for Microsoft Access is that I
have had well over a decade's worth of experience using it at an
intermediate level.
With the magic of SQL I can mix and match these tables. But creating the
table that is 180 rows long and about 12010 variables wide is daunting.
Essentially the 6000 SNPs represent each human having 12000 repeated
measures (6000SNPs times 2 alleles)
I presume I would be able to use the reshape function in R:
"Reshape Grouped Data
Description
This function reshapes a data frame between 'wide' format with repeated
measurements in separate columns of the...
2013 Oct 03
1
prcomp - surprising structure
Hello,
I did a pca with over 200000 snps for 340 observations (ids). If I plot the
eigenvectors (called rotation in prcomp) 2,3 and 4 (e.g. plot
(rotation[,2]) I see a strange "column" in my data (see attachment). I
suggest it is an artefact (but of what?).
Suggestion:
I used prcomp this way: prcomp (mat), where mat is a matrix...
2010 Nov 09
0
haplotype and epistasis analysis using 3 or more SNPs?
Dear Mme/Mr.
Hope you are doing well. I am doing some genetic analysis using The R software and I have difficulties to find how I can perform an Interaction/epistasis analysis using 3 or more SNPs (=markers) ? (In the instructive manual, there is only an interaction/epistasis analysis with 2 markers).
In addition can you please inform me how I can perform Haplotype analysis and if there is an option for the haplotype interaction?
Thanks in advance and best regards,
Fathalli ferid MD.
2011 Dec 13
0
snpStats imputed SNP probabilities
Hi,
Does anybody know how to obtain the imputed SNP genotype probabilities from the snpStats package?
I am interested in using an imputation method implemented in R to be further used in a simulation study context.
I have found the snpStats package that seems to contain suitable functions to do so.
As far as I could find out from the package vignette examples and its help, it give...
2020 Oct 29
1
R: sim1000G
Hi,
I am using the sim1000G R package to simulate data for case/control study.
I can not figure out how to manipulate this code to be able to generate 10%
or 50% causal SNPs in R.
This is whole code provided as example on GitHub:
library(sim1000G)
vcf_file = "region-chr4-357-ANK2.vcf.gz" #nvariants = 442, ss=1000
vcf = readVCF( vcf_file, maxNumberOfVariants = 442 ,min_maf =
0.0005,max_maf = 0.01) #lowest MAF
dim( vcf$gt1 ) #rows represent number of varian...
2011 Feb 03
1
bug in codetools/R CMD check?
...lt;- rbind(value, new)
assign("srcinfo", value, entry)
Apply this "fix" would result in snpMatrix's "R CMD check" churning out:
---------------------
.ld.withmany: local variable ?names.components? assigned but may not be used
.ld.withmany: local variable ?nsnps.for.each? assigned but may not be used
misinherits: local variable ?nc.snps? assigned but may not be used
misinherits: local variable ?nr.snps? assigned but may not be used
qq.chisq: local variable ?lab? assigned but may not be used
read.HapMap.data: local variable ?base? assigned but may not be us...
2005 Mar 04
0
Is aggregate() what I need here?
...do what the user wants (the
LSB_JOBINDEX stuff is added by me so that this can work on many
hundreds of input data files as LSF jobs - it's the nested loops I'm
really interested in):
gtpfile<-paste("genotype_chunk.", sep="", Sys.getenv("LSB_JOBINDEX"))
snps<-read.table(gtpfile,header=TRUE)
exp<-read.table("data.TXT",header=TRUE)
# the above two files have columns for individuals and snps (or genes)
for rows
# so the next two lines simply transpose these data matrices
tsnps<-t(snps)
texp<-t(exp)
sink(paste("output.", se...
2011 Jul 27
1
SNP Tables
Hello,
I have indicators for the present of absent of a snps in columns and the
categorey (case control column). I would like to extract ONLY the tables and
the indices (SNPS) that give me 2 x 3 tables. Some gives 2x 2 tables when
one of the allelle is missing. The data look like the matrix snpmat below:
so the first snp should give me the following table: (...
2012 Mar 12
1
Speeding up lots of calls to GLM
...run each
interaction ~10,000 times.
Thanks in advance, Cheers
Davy.
getInteractions2 = function(data, fSNPcol, ccCol)
{
#fSNPcol is the number of the column that contains the first SNP
#ccCol is the number of the column that contains the outcome variable
require(lmtest)
a = data.frame()
snps = names(data)[-1:-(fSNPcol-1)]
names(data)[ccCol] = "PHENOTYPE"
terms = as.data.frame(t(combn(snps,2)))
attach(data)
fit1 = c()
fit2 = c()
pval = c()
for(i in 1:length(terms$V1))
{
fit1 = glm(PHENOTYPE~get(as.character(terms$V1[i]))+get(as.character(terms$V2...