Entering edit mode
3.8 years ago
vivianbalagon
•
0
Hello, I am a new to bioinformatics and i have a question about the .bed file.
I have a mini .bed file sample that contains 500,000 rows and a corresponding .bigWig file.
I want to split the .bed file randomly into 50 chunks and get the density of each chunk with the .bigWig file. My question is how can i do this?
- I found a function "bigWigAverageOverBed" by ENCODE that can take these two files as input and output "the average score of big wig over each bed ", which is exactly what i want.
- But how should I split the rows in the .bed file? I am doing this in R. Do I just randomly pick 10,000 rows and save it as chunk1.bed, chunk2.bed ...etc and compare with the .bigWig file? Or I can't save the files separately?
thank you.
Thank you for the reply, But is this in R? I want to use R.
no, that's why it's not an answer. But anyway, soon or later you'll have to run a bash command with bigWigAverageOverBed...
let's say I successfully use R to split the .bed file into 50 separate files, is it possible use the separated file as input to the bigWigAverageOverBed function? Since the row size is different (than the .bigWig file).
huh ???
Ummm... so I'm basically confuse about how the bigWigAverageOverBed function works, it only says "Compute average score of big wig over each bed" on the documentation. But how exactly?
So the size of the input .bed file doesn't matter? Maybe i will split the question into the following two questions:
initially I have a .bed file with 500,000 rows and a corresponding .bigWig file. If i input these two file into the bigWigAverageOverBed function. What will i get and in what format? (It seems like (googling) the output would be the same .bed file with a new mean column appended??)
If I split the .bed file into 50 sub files, chunk1.bed, chunk2.bed, ...etc, can I still input the sub file (chunk1.bed) and the same .bigWig file into the bigWigAverageOverBed function? If yes, What will i get and in what format?
See related R solutions at StackOverflow
but I later need to input the .bed file into the function "bigWigAverageOverBed", will splitting and saving into separate files be invalid?