search for: chr2

Displaying 20 results from an estimated 29 matches for "chr2".

Did you mean: chr
2011 Sep 15
2
R functions
Hi group, I am trying to right a code to do the following This is how the test file looks like: Chr start end sample1 sample2 chr2 9896633 9896683 0 0 chr2 9896639 9896690 0 0 chr2 14314039 14314098 0 -0.35 chr2 14404467 14404502 0 -0.35 chr2 14421718 14421777 -0.43 -0.35 chr2 16031710 16031769 -0.43 -0.35 chr2 16036178 16036237 -0.43 -0.35 chr2 16048665 16048724 -0.43 -0.35 chr2 37491676 37491735 0 0 chr2 37702947 37703009 0...
2011 Sep 26
1
How to Store the executed values in a dataframe & rle function
Hi group, This is how my test file looks like: Chr start end sample1 sample2 chr2 9896633 9896683 0 0 chr2 9896639 9896690 0 0 chr2 14314039 14314098 0 -0.35 chr2 14404467 14404502 0 -0.35 chr2 14421718 14421777 -0.43 -0.35 chr2 16031710 16031769 -0.43 -0.35 chr2 16036178 16036237 -0.43 -0.35 chr2 16048665 16048724 -0.43 -0.35 chr2 37491676 37491735 0 0 chr2 37702947 37...
2011 Aug 10
2
Loops for repetitive task
...ach chromosome number with [[i]], but that did not seem to work. Below is the script I have. Basically everywhere you see a '2' I would like there to be an 'i' so that the script can be applied in a general sense. ################################Code############################### chr2.data<-read.table(file="chr2.out.txt", header=F) colnames(chr2.data)<-c("chr","start","end","base1","base2","totalreads","methylation","strand") splc2<-split(chr2.data, paste(chr2.data$chr)) chr2.df&lt...
2008 Feb 06
4
inserting text lines in a dat frame
Hi Jim I am trying to prepare a bed file to load as accustom track on the UCSC genome browser. I have a data frame that looks like the one below. > x V1 V2 V3 1 chr1 11255 55 2 chr1 11320 29 3 chr1 11400 45 4 chr2 21680 35 5 chr2 21750 84 6 chr2 21820 29 7 chr2 31890 46 8 chr3 32100 29 9 chr3 52380 29 10 chr3 66450 46 I would like to insert the following 4 lines at the beginning: browser position chr1:1-10000 browser hide all track type=wiggle_0 name=sample description=chr1_sample visibility=full variableSte...
2017 Aug 22
2
splitting a dataframe in R based on multiple gene names in a specific column
I would appreciate please a suggestion on how to do the following : i'm working with a dataframe in R that contains in a specific column multiple gene names, eg : > df.sample.gene[15:20,2:8] Chr Start End Ref Alt Func.refGene Gene.refGene284 chr2 16080996 16080996 C T ncRNA_exonic GACAT3448 chr2 113979920 113979920 C T ncRNA_exonic LINC01191,LOC100499194465 chr2 131279347 131279347 C G ncRNA_exonic LOC440910525 chr2 223777758 223777758 T A exonic AP1S3626 chr3 99794575 99794575...
2017 Aug 25
1
splitting a dataframe in R based on multiple gene names in a specific column
...stats': #> #> filter, lag #> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union library(purrr) library(tidyr) df.sample.gene<-read.table( text="Chr Start End Ref Alt Func.refGene Gene.refGene 284 chr2 16080996 16080996 C T ncRNA_exonic GACAT3 448 chr2 113979920 113979920 C T ncRNA_exonic LINC01191,LOC100499194 465 chr2 131279347 131279347 C G ncRNA_exonic LOC440910 525 chr2 223777758 223777758 T A exonic AP1S3 626 chr3 99794575 99794575 G A exonic...
2011 Jan 31
1
how to search to value to another table
Hello, I'm a new R user. I have two different dummy tables with the variable name tb1 and tb2. tb1< v1 v2 v3 v4 "chr1" 22 23 3 "chr1" 36 37 1 "chr1" 54 55 0 "chr1" 77 78 1 "chr2" 80 81 4 "chr2" 85 86 0 "chr2" 99 100 1 "chr2" 105 106 0 "chr2" 120 121 1 "chr2" 130 131 1 "chr2" 140 141 0 "chr2" 150 151 5 "chr3" 172 173 0 "ch...
2017 Aug 23
0
splitting a dataframe in R based on multiple gene names in a specific column
Hi Bogdan, Messy, and very specific to your problem: df.sample.gene<-read.table( text="Chr Start End Ref Alt Func.refGene Gene.refGene 284 chr2 16080996 16080996 C T ncRNA_exonic GACAT3 448 chr2 113979920 113979920 C T ncRNA_exonic LINC01191,LOC100499194 465 chr2 131279347 131279347 C G ncRNA_exonic LOC440910 525 chr2 223777758 223777758 T A exonic AP1S3 626 chr3 99794575 99794575 G A exonic COL...
2008 Feb 04
1
counting identical data in a column
Hi Peter I have the following data frame with chromosome name, start and end positions: chrN start end 1 chr1 11122333 11122633 2 chr1 11122333 11122633 3 chr3 11122333 11122633 8 chr3 111273334 111273634 7 chr2 12122334 12122634 4 chr1 21122377 21122677 5 chr2 33122355 33122655 6 chr2 33122355 33122655 I would like to count the positions that have the same start and add a new column with the count number; the new data frame should look like this: chrN start end count 1...
2010 May 20
5
sort a data.frame
Hello,   I have a dataframe: dd <- data.frame(b = c("chr2", "chr1", "chr15", "chr13"),         x = c("A", "D", "A", "C"), y = c(8, 3, 9, 9),         z = c(1, 1, 1, 2))   >dd       b x y z 1  chr2 A 8 1 2  chr1 D 3 1 3 chr15 A 9 1 4 chr13 C 9 2 Now I want to sort them according...
2008 Feb 10
11
data frame question
...ta frame new_df which will contain only the common rows based on the first 2 columns (chrN and start). The column score in the new data frame should be replaced with a column containing the average score (average_score) from df1 and df2. df1= data.frame(chrN= c(“chr1”, “chr1”, “chr1”, “chr1”, “chr2”, “chr2”, “chr2”), start= c(23, 82, 95, 108, 95, 108, 121), end= c(33, 92, 105, 118, 105, 118, 131), score= c(3, 6, 2, 4, 9, 2, 7)) df2= data.frame(chrN= c(“chr1”, “chr2”, “chr2”, “chr2” , “chr2”), start= c(23, 50, 95, 20, 121), end= c(33, 60, 105, 30, 131), score= c(9, 3, 7, 7,...
2011 Sep 28
0
Rle function to expand for many samples
...rame(c(rle(m$Sample1)[[2]],rle(m$Sample2)[[2]],rle(m$Sample3)[[2]]),c(rle(m$Sample1)[[1]],rle(m$Sample2)[[1]],rle(m$Sample3)[[1]])) > names(s)=c("Values","Probes") #Suppose the test file looks like with ofcourse more samples with values: Chr Start End Sample1 Sample2 Sample3 chr2 9896633 9896683 0 0 0 chr2 9896639 9896690 0 0 0 chr2 14314039 14314098 0 -0.35 0 chr2 14404467 14404502 0 -0.35 0.32 chr2 14421718 14421777 -0.43 -0.35 0.32 chr2 16031710 16031769 -0.43 -0.35 0.32 chr2 16036178 16036237 -0.43 -0.35 0.45 chr2 16048665 16048724 -0.43 -0.35 0.45 chr2 37491676...
2011 Oct 17
2
Histogram for each ID value
I have a dataframe in the general format: chr1 0.5 chr1 0 chr1 0.75 chr2 0 chr2 0 chr3 1 chr3 1 chr3 0.5 chr7 0.75 chr9 1 chr9 1 chr22 0.5 chr22 0.5 where the first column is the chromosome location and the second column is some value. What I'd like to do is have a histogram created for each chr location (i.e. a separate histogram for chr1, chr2, chr3, chr7, chr9,...
2010 Oct 01
1
[Help]:How to use "loop" to achieve this aim?
Hello, Everyone, how to use "loop" to make the process automatic and fast? When compute each sample, the script type in R almost the same, just the input and output file's name is changed(chr1 change to chr2, chr3,chr4...). The first sample's script like this: >chr1=MEDIPS.readAlignedSeqences(BSgenome="hg19", file="chr1",numrows= ) >chr1=MEDIPS.genomeVector(data=chr1, bin_size=50,extend=250) ... ... >write.table(frameschr1.frame500.step250, file="frames.chr1.meth....
2011 Oct 19
1
replacing percentage of values in data frame
...for how to change a certain percentage of values in a data frame, but I've been struggling to find information in R. For example: #################example data############## > data V1 V2 V3 V4 V5 V6 V7 1 chr1 500 500 CHH 0 0.5 + 2 chr1 550 550 CHH 0 0.0 + 3 chr2 700 700 CHH 0 0.0 + 4 chr2 1000 1000 CHH 0 0.0 + 5 chr3 100 100 CHH 0 0.0 + 6 chr4 450 450 CG 0 0.0 + 7 chr5 450 450 CHH 0 0.0 + 8 chr5 50034 50034 CHG 0 0.0 + 9 chr7 50055 50055 CHG 0 0.0 + 10 chr10 50063 50063 CHH 0 0.0 + > dput(data) structure(l...
2010 Jun 07
1
average two sets of columns
Hi R experts. how can I average two sets of columns? dd <- data.frame(b = c("chr2", "chr1", "chrY", "chr13", "chrX"),         w=11:15, x = 1:5, y = c(8, 3, 9, 9,7),        z = c(1, 1, 1, 2, 8)) expected result for mean(w,x) and mean(y,z) is 1  chr2 6  4.5 2  chr1 7  2 3  chrY 8  5 4 chr13 9  5.5 5  chrX 10 7.5 Yu [[alter...
2008 Feb 18
3
remove column names from a data frame
I want to remove the column names from a data frame. I do it the long way, can any body show me a better way ? df= data.frame(chrN= c(“chr1”, “chr2”, “chr3”), start= c(1, 2, 3), end= c(4, 5, 6), score= c(7, 8, 9)) df #I write a txt file without row or column names write.table(df,"df1.txt",sep='\t',quote=FALSE,row.names=F,col.names=F) #then I read it with the header = F to obtain the format I want df1=read.table(&quo...
2011 Jun 08
1
return counts of elements on a table column depending on elements on another column
...fGene exon 66999825 67000051 0 + . gene_id NM_032291 3 chr1 hg19_refGene CDS 67091530 67091593 0 + 2 gene_id NM_032291 4 chr1 hg19_refGene exon 67091530 67091593 0 + . gene_id NM_032291 5 chr1 hg19_refGene CDS 67098753 67098777 0 + 1 gene_id NM_032291 6 chr2 hg19_refGene exon 67098753 67098777 0 + . gene_id NM_032291 What I've done is to find out how many of the elements on 3rd column are "CDS", "exon". sum(hsa_refseq$region=="CDS") sum(hsa_refseq$region=="exon") But what I would like is to prin...
2010 Nov 07
1
How do I order xyplot line points?
I have the following xyplot figure: http://img577.imageshack.us/img577/686/filesizeresults12000000.png The data are organized in a matrix file as follows: Type Elements Chromosome Time bedGz 12000000 chr1 14.240 bedGz 12000000 chr2 7.949 bedGz 12000000 chr3 5.103 bedGz 12000000 chr4 5.290 bedGz 12000000 chr5 5.161 ... The x-axis labels in the Chromosome column are ordered lexicographically in my figure ( chr1 > chr10 > chr11 > ... ) ? this is correct. However, the code I use to draw lines between points in...
2012 Jul 02
1
apply with multiple conditions
Hello all, I have written a for loop to act on a dataframe with close to 3million rows and 6 columns and I would like to pass it to apply() to speed the process up (I let the loop run for 2 days before stopping it and it had only gone through 200,000 rows) but I am really struggling to find a way to pass the arguments. Below are the loop and the head of the dataframe I am working on. Any hints