Displaying 20 results from an estimated 24 matches for "snp1".
Did you mean:
snp
2009 Apr 22
3
Merging data frames, or one column/vector with a data frame filling out empty rows with NA's
Hello
I have two data frames, SNP4 and SNP1:
> head(SNP4)
Animal Marker Y
3213 194073197 P1001 0.021088
1295 194073197 P1002 0.021088
915 194073197 P1004 0.021088
2833 194073197 P1005 0.021088
1487 194073197 P1006 0.021088
1885 194073197 P1007 0.021088
> head(SNP1)
Animal Marker x
3213 19407...
2008 May 13
2
array dimension changes with assignment
Why does the assignment of a 3178x93 object to
another 3178x93 object remove the dimension attribute?
> GT <- array(dim = c(6,nrow(InData),ncol(InSNPs)))
> dim(GT)
[1] 6 3178 93
> SNP1 <- InSNPs[InData[,"C1"],]
> dim(SNP1)
[1] 3178 93
> SNP2 <- InSNPs[InData[,"C2"],]
> dim(SNP2)
[1] 3178 93
> dim(pmin(SNP1,SNP2))
[1] 3178 93
> GT[1,,] <- pmin(SNP1,SNP2)
> dim(GT)
NULL # why??????????????????????????????????????
&g...
2009 Feb 27
5
Filtering a dataset's columns by another dataset's column names
Hello all,
I hope some of you can come to my rescue, yet again.
I have two genetic datasets, and I want one of the datasets to have only the columns that are in common with the other dataset.
Here is a toy example (my real datasets have hundreds of columns):
Dataset 1:
Individual SNP1 SNP2 SNP3 SNP4 SNP5
1 A G T C A
2 T C A G T
3 A C T C A
Dataset 2:
Individual SNP1 SNP3 SNP5 SNP6 SNP7
4 A T T G C
5 T A A G G
6 A A T C G
I want Dataset1 to have only columns tha...
2011 Mar 10
1
snp-chip table
Dear R helpers
I have a table and i need to make new table
table1:
sire snp1 snp2 snp3 snp4 snp5 snp6 snp7 snp8 snp9 snp10
snp11 snp12 snp13 snp14 snp15 8877 -1 -1 -1 -1 0 0 -1 -1 -1 0 1 1 1 -1 -1
7765 1 1 1 0 0 0 -1 1 1 1 0 0 0 1 0 8766 1 1 -1 0 -1 -1 0 -1 0 -1 -1 -1 0 1
0 6756 0 1 0 -1 1 -1 -1 0 0 0 0 -1 0 1 1 5644 -1 0 1 -1 0 0 0 0 -1 -1 0 0 0
0 1
I have table2
sir...
2009 Mar 26
4
same value in column-->delete
Hi Readers,
I have a question.
I have a large dataset and want to throw away columns that have the same
value in the column itself and I want to know which column this was.
For example
> x<-data.frame(id=c(1,2,3), snp1=c("A","G",
"G"),snp2=c("G","G","G"),snp3=c("G","G","A"))
> x
id snp1 snp2 snp3
1 1 A G G
2 2 G G G
3 3 G G A
Now I want to know that snp2 in monom...
2009 Mar 20
1
reshape dataframe
Hi,
I have a large dataset on which I would like to do the following:
x<-data.frame(id=c(1,2,3), snp1=c("AA","GG",
"AG"),snp2=c("GG","AG","GG"),snp3=c("GG","AG","AA"))
> x
id snp1 snp2 snp3
1 1 AA GG GG
2 2 GG AG AG
3 3 AG GG AA
And then reshape the datase...
2010 Aug 05
2
a question about 'read.table' with or without 'read.table'.(urgent)
Hi, I've got a quite tricky question.
I have a txt file, named 'temp.txt', as the following:
snp1 snp2 snp3
AA 00 00
GG GG 00
00 AA 00
I want to read the file into R.
1) when I use 'read.table' without 'header=T' option,
> temp <- read.table('temp.txt')
# I got
> temp
V1 V2 V3
1...
2011 Jan 22
1
R TABELS
Hi
ihave one table that look like
SNP1 SNP2 SNP3 SNP4 SNP5
SIRE1 1 -1 -1 1 -1
SIRE2 1 -1 1 1 1
SIRE3 -1 -1 1 1 0
SIRE4 -1 1 1 0 1
SIRE5 -1 1 -1 -1 1
SIRE6 0 0 0 1 -1
SIRE7 -1 0 -1 1 1
SIRE8 1 -1 NA 0 NA
SIRE9 -1 1 1 -1 -1
SIRE10 1 1 1 1 1
table 2 only one line...
2014 Jun 03
2
LIbvirt Python Snapshot -Domain Crashing
Hi,
I'm using libvirt(1.0.0) with python, for managing virtual machines..
but while taking multiple snapshot domain is crashing...
Snapshot XML
-------------------------
<domainsnapshot>
<name>snp1</name>
<creationTime></creationTime>
<description>Description</description>
<state></state>
<domain>
<uuid></uuid>
</domain>
<parent>
<name></name>
</parent>
</domainsnapshot>
---...
2010 Aug 05
2
questions about string handling
Hi, I have a question about the data handling. I have a dataset as following:
ID snp1 snp2 snp3
1001 0/0 1/1 1/1
1002 2/2 3/3 1/1
1003 4/4 3/3 2/2
I want to convert the dataset to the following format:
ID snp1 snp2 snp3
1001 00 AA AA
1002...
2007 May 04
0
Predicted Cox survival curves - factor coding problems...
I am trying to use the survfit() function with the newdata argument to
produce predicted survivor curves for a particular covariate profile.
The main purpose of the plot will be to visualise the effect of snp1,
coded 0 and 1. In my Cox model I have stratified by one variable, edu, and
so I know I will automatically get a separate curve for each strata. My
problem is how to deal with the variable sitenew, which is a 3 level
factor (coded 0,1,2).
coxsnps$edu <- as.factor(coxsnps$edu)
coxsnps$sitene...
2007 May 07
1
Predicted Cox survival curves - factor coding problems..
...new
to a fit that contained that variable as a factor. (Perhaps it should be smart
enough to at least die gracefully -- but it's not).
The simple solution is to not use factors.
site1 <- 1*(coxsnps$sitenew==1)
site2 <- 1*(coxsnps$sitenew==2)
test1 <- coxph(Surv(time, censor) ~ snp1 + sex + site1 + site2 + gene +
eth.self + strata(edu), data= coxsnps)
output
profile1 <- data.frame(snp1=c(0,1), site2=c(0,0), sex=c(0,0),
site1=c(0,0), site2=c(0,0), geno=c(0,0) eth.self=c(0,0))
plot(survfit(test1, newdata=profile1))
Note that you do not have to ex...
2011 Jan 23
1
SNP IMPUTATION
Hi
ihave one table that look like
SNP1 SNP2 SNP3 SNP4 SNP5
SIRE1 1 -1 -1 1 -1
SIRE2 1 -1 1 1 1
SIRE3 -1 -1 1 1 0
SIRE4 -1 1 1 0 1
SIRE5 -1 1 -1 -1 1
SIRE6 0 0 0 1 -1
SIRE7 -1 0 -1 1 1
SIRE8 1 -1 NA 0 NA
SIRE9 -1 1 1 -1 -1
SIRE10 1 1 1 1 1
table 2 only one line
SNP1 SNP2 SNP3 SN...
2011 Jul 27
1
SNP Tables
...Aa=1 and AA=2)
aa Aa AA
case 2 3 0
control 2 2 0
So I should not use this one or if I am using it, then I need to see 0 0 in
to AA column which I don't see when I use the table command in R.
snpmat
category SNP1 SNP2 SNP3 .... SNPN
case 1 0 2 1
case 0 1 1 2
case 1 2 2 0
control 0 1 0 1
con...
2013 Jul 02
2
Recoding variables based on reference values in data frame
I'm new to R (previously used SAS primarily) and I have a genetics data
frame consisting of genotypes for each of 300+ subjects (ID1, ID2, ID3,
...) at 3000+ genetic locations (SNP1, SNP2, SNP3...). A small subset of
the data is shown below:
SNP_ID SNP1 SNP2 SNP3 SNP4 Maj_Allele C G C A Min_Allele T A T G ID1
CC GG CT AA ID2 CC GG CC AA ID3 CC GG
nc
AA ID4 _ _ _ _ ID5 CC GG CC AA ID6 CC GG CC
AA...
2014 Jun 03
1
Re: LIbvirt Python Snapshot -Domain Crashing
...urs,( at a later
point of time It should be possible to revert to the actual domain state
when I took the snapshot), I'm using libvirt APIs python bindings,
there are many flags defined, so which way I can accomplish it..?
as of now I"m using flag value as zero.
API Call
--------------
snp1=domain1.snapshotCreateXML(snp_xml,0)
virDomainSnapshotCreateFlags
enum virDomainSnapshotCreateFlags {
VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE = 1
Restore or alter metadata
VIR_DOMAIN_SNAPSHOT_CREATE_CURRENT = 2
With redefine, make snapshot current
VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATA = 4
Make sna...
2008 Jan 21
2
reordering huge data file
...text-file, line by line, evaluate it and write it back into a textfile in a different position;
Phenotypeinfo.txt (contains phenotype information)
Before.txt (contains genotypeinformation -see below-)
SNP;1-305,000 ID:1-900 allele.A alleleB
After.txt (the required format)
ID:1-250 phenotype SNP1.allelA SNP1.alleleB SNP2.Allele.A SNP2.allele.B etc
I have been looking at ?read.table/scan/readline/SQL-light but have not resolved it. Should I refer to PERL or can this be tackled?
I am using a windows machine with R 2.6.0
Any help would be highly appreciated,
Many Thanks,
Marco
2010 May 28
0
how to use GenABEL genetic information??
...ulate SNP
interactions.
I have a list of 100 SNPs, I need to look at the interaction between each of
two SNPs among the list. my question is how to perform this in GenABEL. I
want to use the "lm" function, but don't know how to use the SNP
information.
for example:
result <- (lm(y~SNP1+SNP2+SNP1*SNP2))
the problem here is the "SNP1,SNP2" are not working in this place, because
it's not a right format to use the SNP information stored in the GenABEL
library. Someone said I could first import the GenABEL format genetic data
to the format used by "genetics" li...
2009 Sep 01
1
permutation and reshuffling
...enotype) for certain number of individuals and creating a loop that will
randomly simulate it for 10000 times *(permutation)*. I also need to find
how I keep the information (p value for each SNP) gathered for all the 10000
iterations.
My data set looks like this (n=500):
Individual #
Phenotype
SNP1
SNP2
SNP3
SNP4
SNP5
SNP6
SNP7
SNP8
SNP9
SNP10
SNP11
SNP12
1
0
T
T
G
G
A
C
G
T
A
A
T
C
2
1
A
T
C
G
A
C
G
T
A
G
T
C
Many thanks,
Jonathan
[[alternative HTML version deleted]]
2010 Nov 03
0
how to handle 'gwaa@gtdata' ?
...at phdata', it's easy to add these
rows, but for 'gwaa at gtdata', I think I need to create SNP data as '0 0 0 0
0.....' for all the dummy parents first. I am using the function
'convert.snp.ped', so I need a 'pedfile' of this format:
#ped id fa mo sex trait snp1.allele1 snp1.allele2 snp2.allele1 snp2.allele2
...#
1 1 0 0 1 2 0 0 0 0 ...
1 2 0 0 1 0 0 0 0 0 ...
1 3 0 0 2 1 0 0 0 0 ...
.
.
100 101 0 0 2 1 0 0 0 0 ...
If we use the 1M microarray, usually, after QC, there will be ~800 thousands
SNPs, so this file is really huge. I created this matrix in R, a...