search for: phenotyp

Displaying 20 results from an estimated 88 matches for "phenotyp".

Did you mean: phenotype
2011 Dec 15
1
lme with nested factor and random effect
Hello all, I'm having difficulty with setting up a mixed model using lme in the nlme package. To summarize my study, I am testing for effects of ornamentation on foraging behavior of wolf spiders. I tested spiders at two different ages (penultimate vs. mature) and of two different phenotypes (one species tested lacks ornamentation throughout life [non-ornamented males] while the other acquires ornamentation upon maturation [i.e. brush-legged males]). I tested a sample of brush-legged and non-ornamented males (as both penultimates and matures) in 2009, and an additional sample of brus...
2009 Sep 22
2
glm analysis repeated for 900 variables
Dear R users, Could you help my with the following problem? I want to repeat a glm analysis with 2 independent variables for all 900 variables (snps) in my data set. So, I want to check whether snp1 has a different effect on my outcome variable in patients and controls(phenotype). And repeat that for snp2 to snp900. Is there an easy way to get a summary of the data, e.g. a list of P values of all 900 variables? I tried something with a loop: for (i in 1:length(data)) { print (summary (glm (outcome~data[[i]]*phenotype, data=data))) } # This works, but gives 900 written...
2011 Oct 07
1
Creating One Single Object with Phenotype and Expression Data
Hey, I have code that can check the quality of a data set we're working with (expression data), and I'm having some trouble writing code that would make the expression data we have tie to other data we want to link it to (called phenotype data). Does anyone have any advice on how I could make a single object that would do this? Other relevant info: I want to use the pdata() function, and I have all the phenotype data available as csv files. Here is what I have in regards to the expression data: library(affy) library(arrayQualit...
2008 Jan 21
2
reordering huge data file
Dear R-experts, My problem is how to handle a 10GB data file containing genotype data. The file is in a particular format (Illumina final report) and needs to be altered and merged with phenotype data for further analysis. PERL seems to be an frequently used solution for this type of work, however I am inclined to think it should be doable with R. How do I open a text-file, line by line, evaluate it and write it back into a textfile in a different position; Phenotypeinfo.txt (contains...
2013 Feb 28
2
data grouping and fitting mixed model with lme function
...ear all,   I have data from the following experimental design and trying to fit a mixed model with lme function according to following steps but struggling. Any help is deeply appreciated.   1) Experimental design: I have 40 plants each of which has 4 clones. Each clone planted to one of 4 blocks. Phenotypes were collected from each clone for 3 consecutive years. I have genotypes of plants. I need to relate phenotype to genotype.   2) I am reading data from a file with “read.table” function. Then grouping data as: my.Data<-groupedData( phenotype ~ Block | PlantID, data = as.data.frame( Data ) )...
2012 Dec 17
2
Formatting a path for unix with gsub
I have a path: path = "/nfs/users/nfs_n/ns9/ Phenotype Analysis/Results/Run_AmplRatio_neg BinaryAll trained without akapn+tnik.csv" I wish to replace the spaces with "\ " so that it can be read by a system call to unix. Using gsub I try: > gsub(" ","\\ ",path) [1] "/nfs/users/nfs_n/ns9/Phenotype Analysis/R...
2007 Nov 05
1
Help with Error Message
...ut "Error: element 12 is empty". I'm wondering if my syntax is incorrect within legend.list. If anyone has any suggestions to sees something obvious that I am missing, I would greatly appreciate any help. Many Thanks, Patrick > # These are the symbols and colors to use for each phenotype in the model and test sets > # model samples: square symbols > # color symbol phenotype > legend.list <- c("green", 22, # ALL-B + "steelblue", 22, # ALL-T + &quot...
2009 Nov 09
1
Using something like the "by" command, but on rows instead of columns
Hello R Forum users, I was hoping someone could help me with the following problem. Consider the following "toy" dataset: Accession SNP_CRY2 SNP_FLC Phenotype 1 NA A 0.783143079 2 BQ A 0.881714811 3 BQ A 0.886619488 4 AQ B 0.416893034 5 AQ B 0.621392903 6 AS B 0.031719125 7 AS NA 0.652375037 "Accession" = individual plants, arbitrarily identified by unique numbers "SNP_"...
2011 Nov 24
0
loop through columns in S4 objects
Dear experts, I am trying to perform an association using snpStats. I have a snp matrix called 'plink' which contains my genotype data (as a list of $genotypes, $map, $fam), and a phenotype data frame which contains the outcomes (outcome1, outcome2,...) I would like to associate with the genotype. My question is, how do I loop through the outcomes? This type of data seems different from all the others and I am having trouble manipulating it, so I would also be grateful if you have su...
2011 Oct 31
3
Plot two matrices and keeping the record of row names
...0000 0.00 0.3333333 b 0.0000000 1.00 0.0000000 0.25 0.0000000 c 0.5000000 0.00 1.0000000 0.00 0.1666667 d 0.0000000 0.25 0.0000000 1.00 0.0000000 e 0.3333333 0.00 0.1666667 0.00 1.0000000 basically these two matrices are the similarity matrices between the patients. x1 is genotypically and y1 is phenotypically. Now I want to generate a plot to see which patients have high similarity genotypically as well as phenotypically. So I am using plot(x1[upper.tri(x1)],y1[upper.tri(y1)]) #taking only the upper triangle of matrices as other half is same. The plot is coming fine.But I am loo...
2009 Sep 01
1
permutation and reshuffling
Hi, I'm looking for an efficient code that will enable me to reshuffle data (phenotype) 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...
2009 Aug 31
1
permutation test - query
Hi, My query is regarding permutation test and reshuffling of genotype/phenotype data I have been using the haplo.stats package of R. for haplotype analysis and I would like to perform an analysis which I'm requesting your advice. I have a data set of individuals genotyped for 12 SNP and a dichotomous phenotype. At first, I have tested each of those SNP independently in or...
2011 May 04
1
merging multiple columns from two dataframes
Hello, I have data in a dataframe with 139104 rows which is multiple of 96x1449. i have a phenotype file which contains the phenotype information for the 96 samples. the snp name is repeated 1449X96 samples. I haveto merge the two dataframes based on sid and sen. this is how my two dataframes look like dat<-data.frame(snpname=rep(letters[1:12],12),sid=rep(1:12,each=12), genotype=...
2012 Mar 12
1
Speeding up lots of calls to GLM
...y. 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[i])),family="binomial") fit2 = glm(PHENOTYPE~get(as.cha...
2005 Sep 09
2
R-help Digest, Vol 31, Issue 9
....05. How can I cite the P-valus from lm result ? Ping The code: #using LM to model general fati for (j in 48:52) { for (i in 3:46){ gen.fat<-y_x[,j] gen.fat<-as.numeric(gen.fat) snp_marker<-y_x[,i] x<-colnames(y_x) #snp_marker<-as.matrix(snp_marker) #mode(snp_marker) cat("phenotype is = ",x[j] , "\n") cat("snp marker is = ",x[i] , "\n") zz<-summary(lm.D9 <- lm(gen.fat~snp_marker)) print(zz) return } } [[alternative HTML version deleted]]
2006 Jul 23
1
Iterated Data Input/Output with Random Forests
...I am currently writing code to input a few thousand files, run them through the Random Forests package, and then output corresponding results. When I use the code below: zz<-textConnection("ex.lm.out", "w") sink(zz) tempData<-read.delim(paste("allSnps",1,"Phenotype.phn",sep=""),header=TRUE,sep=",",quote="\"",dec=".") tempData[[1]]<-factor(tempData[[1]]) tempData.rf<-randomForest(tempData[[1]]~.,data=tempData,importance=TRUE,proximity=TRUE,outscale=TRUE,replace=TRUE) tempData.rf zz<-file(paste("e...
2013 Jan 12
1
Question on broken-line regression: 'segmented' or alternative
...etermination of breakpoints and comparison of slopes from broken-line regression models. Although this is rather a standard problem in data analysis, all information I gathered so far, did not answer my questions. I added a subsetted example of my data. Basically it is a timeseries of recorded phenotypes in three different groups of plants. You will see in the plot that the phenotype between groups behaves differently over time. Plotted data of Group 3 look like a nice linear relationship between phenotype (y) and time (x). Group 1 seems to have 1 breakpoint (at x=31) and Group 3 has 2 breakpo...
2005 Sep 15
4
Rcommander and simple chisquare
...stat teaching I will include Rcommander (it indeed simplifies syntax problems that makes students frequently miss the core statistical problems). But I could not find how to make a simple chisquare comparison between observed frequencies and expected frequencies (eg in genetics where you expect phenotypic frequencies corresponding to 3:1 in standard dominant/recessif alleles). Any idea where this feature might be hidden? Or could it be added to Rcommander? Thanks, Christian. ps: in case I am not making myself clear, can Rcommander be made to perform > chisq.test(c(61,39),p=c(0.75,0.25))
2007 Dec 20
1
custom subset method / handling columns selection as logic in '...' parameter
...lection more flexible than "[" method . The schema I am thinking for is the following: subset.ExpressionSet <- function(x,subset,...){ } I will use the subset argument for rows (genes), as in default method. Now I would like to allow to select different columns (features) based on phenotypic data. phenotypic data provides detailed information about the columns. Basically, first function I have written allows the following: > sub1 <- subset(ExpressionSetObject, subset=NULL, V1=value1, v2=value2) # subset=NULL takes all rows See: there are two conditions on two variables belon...
2011 Jul 14
2
R package: pbatR
...y <- data.frame(pid = c(1,1,1,2,2,2,2,3,3,3), id = c(1,2,3,1,2,3,4,1,2,3), age = c(55,50,22,38,37,15,11,42,41,17), weight = c(185,170,130,165,170,90,60,170,160,120)) y1 <- as.phe(y) 1. I first consider a model with the disease as a phenotype, and two SNPs as predictors (on covariates) as bellow: pbat.m(AffectionStatus ~ NONE, y1, x1, fbat="gee", distribution='categorical', offset='none') But some error messages were returned: Error in writeCommandStrMatch("distribution", distribution, c("defa...