I am trying to build input matrices of LogR and B Allele Frequency (BAF) data (ASCAT). I have copy number files and allelic frequencies files
Table 1:
feature chromosome start end segments
1:840001-870000 1 840001 870000 -0.003
Table 2: Chrom Pos VAF
1 876499 1.0000000
1 878314 0.6666667
How to pair table 2 into the copy number intervals of table 1? Have tried this, but does not work:
for (i in 1:nrow(testcna)) {
testX <- which(testcna$chromosome == testbaf$Chrom[i] & (testcna$start <= testbaf$Pos[i] & testcna$end >= testbaf$Pos[i]))
}
Just for clarification so that I maybe can answer your question, what is your goal? To prepare the LogR and BAF-files so that you can run ASCAT to get copy number profiles of your sample? Or have you already run ASCAT?