Thanks a million Arno, this worked for me!
• 0 views
•
link
I'm looking for the easiest method in R to convert my segmented aCGH probes into log ratios per gene (they're not called). Furthermore I only have chromosome number and start position available. What is the best way to achieve this goal?
Hello,
Here is my solution:
I use bedtools intersect to find overlaps between segdata output and genes coordinates (refseq from ucsc).
bedtools intersect -a segData.bed -b genes.bed -loj > overlap.bed
Then with R
res = read.table("overlap.bed",sep="\t",header=F)
abs_max = tapply(res$V4,as.character(res$V8),function(x){ x[which.max(abs(x))] })
As you can see, I take the maximum in absolute value
res$V4 correspond to the log2ratio valueres$V8 correspond to the SymbolIf you need more help, let me know.
Thanks a million Arno, this worked for me!
Log in to answer this question.