search for: snp_id

Displaying 10 results from an estimated 10 matches for "snp_id".

2004 Jul 23
4
Reading ASCII files
Dear all, I need to read an ASCII file with diffent length lines. This is what is contained in the file gene.txt: 1st line ID description snp_id genotype 2nd line 10003 Low rs152240 3rd line 10003 Moderate rs189011 TC 4th line 10004 Conservative rs152240 GC 5th line 10004 Bad rs154354 6th line 10013 Bad rs152240 7th line 10019 Conservative rs152240 AC etc... This is what I would like to obtain in R: ID description snp_id...
2009 Jul 13
3
read.delim skips first column (why?)
Hi people, I have a text file like this one posted: snp_id gene chromosome distance_from_gene_center position pop1 pop2 pop3 pop4 pop5 pop6 pop7 rs2129081 RAPT2 3 -129993 "upstream" 0.439009 1.169210 NA 0.233020 0.093042 NA -0.902596 rs1202698 RAPT2 3 -12...
2024 Nov 15
1
R coding to extract allele frequencies from NCBI for ALL alleles of one SNP?
...oding which could extract the data from NCBI for all the alleles of one SNP ? I've looked at getBM() from package biomaRt and searched via Google and Copilot- so far with no success. Many thanks. remotes::install_github("ropensci/rsnps") library("rsnps") # Define the SNP ID snp_id <- "rs11134679" ## this SNP has alleles A, C, G and T, but results are only for A # Query the dbSNP database result <- rsnps::ncbi_snp_query(snp_id) result2 <- as.data.frame(result) result2 result2$maf_population [[alternative HTML version deleted]]
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 ID7 CC GG CT AA ID8 _ _ _ _ ID9 CT GG CC AG...
2008 Jun 24
9
R help
Dear Sir/Madam, I found your email address and your correspondence with R-users. I hope you could help me with this question about the function "ur.ers" in the package of "urca". It is an improved unit root test (Elliott et al. 1996 Econometrica). Do you know how to extract the value of the test statistic from the output? The only thing I can get is the print-out of all
2020 May 23
0
paste(character(0), collapse="", recycle0=FALSE) should be ""
...2, 2020, 6:16:45 PM EDT, Herv? Pag?s <hpages at fredhutch.org> wrote: > > Gabe, > > It's the current behavior of paste() that is a major source of bugs: > >?? ## Add "rs" prefix to SNP ids and collapse them in a >?? ## comma-separated string. >?? collapse_snp_ids <- function(snp_ids) >?????? paste("rs", snp_ids, sep="", collapse=",") > >?? snp_groups <- list( >???? group1=c(55, 22, 200), >???? group2=integer(0), >???? group3=c(99, 550) >?? ) > >?? vapply(snp_groups, collapse_snp_ids, character(...
2020 May 22
5
paste(character(0), collapse="", recycle0=FALSE) should be ""
Gabe, It's the current behavior of paste() that is a major source of bugs: ## Add "rs" prefix to SNP ids and collapse them in a ## comma-separated string. collapse_snp_ids <- function(snp_ids) paste("rs", snp_ids, sep="", collapse=",") snp_groups <- list( group1=c(55, 22, 200), group2=integer(0), group3=c(99, 550) ) vapply(snp_groups, collapse_snp_ids, character(1)) # group1...
2020 May 24
0
paste(character(0), collapse="", recycle0=FALSE) should be ""
..., May 22, 2020 at 3:16 PM Herv? Pag?s <hpages at fredhutch.org> wrote: > Gabe, > > It's the current behavior of paste() that is a major source of bugs: > > ## Add "rs" prefix to SNP ids and collapse them in a > ## comma-separated string. > collapse_snp_ids <- function(snp_ids) > paste("rs", snp_ids, sep="", collapse=",") > > snp_groups <- list( > group1=c(55, 22, 200), > group2=integer(0), > group3=c(99, 550) > ) > > vapply(snp_groups, collapse_snp_ids, cha...
2020 May 22
2
paste(character(0), collapse="", recycle0=FALSE) should be ""
I agree with Herve, processing collapse happens last so collapse=non-NULL always leads to a single character string being returned, the same as paste(collapse=""). See the altPaste function I posted yesterday. Bill Dunlap TIBCO Software wdunlap tibco.com On Fri, May 22, 2020 at 9:12 AM Herv? Pag?s <hpages at fredhutch.org> wrote: > I think that > >
2009 Jun 29
5
Help
HiĀ group, I found a module for adaptive kernel density estimation for Stata users, but unfortunetly I don't have access to Stata, can I find a similar approach using R? Thank u so much 4 ur time. [[alternative HTML version deleted]]