I downloaded a dataset from your the UCSC Genome Browser- "Table Browser" with the following input parameters:
"Mouse + Mapping and sequencing".
This is an effort to find a measure of mappability throughout the genome (at bp level) and to align these measurements with a previous experiment output of GC content (also mapped to the genome at a nucleotide level), I want to plot and contrast GC content vs mappability.
As I have already found the GC content using HOMER (where 'annotate.pl' records the GC content at a nucleotide level):
annotatePeaks.pl /projects/reference_genome.bed mm9 -size 20000 -hist 10 -d -CpG > GC_content.txt
I would now like to take the dataset from the UCSC genome browser and plot it against the GC content: The downloaded dataset is in the following format:
chr1 3000000 3000058 1
chr1 3000058 3000059 0.5
chr1 3000059 3000060 0.0625
chr1 3000060 3000073 0.05
This is a bedgraph file and I need it to be converted such that the mappability is documented at a 'per base' level. Note that lengths of nucleotides are skipped which is not a the 'per base' level...
I attempted to do this with "BedTools" as per the following template:
bedtools genomecov [OPTIONS] [-i|-ibam] -g
typical attempt (where '-d' signifies that coverage should be at the 'per base' level)
bedtools genomecov -d -i UCSC_mm9_mappability_dataset -g
Error: The requested genome file () could not be opened. Exiting!
But I get the above error
(I have also tried without '-g' and and with '-bg' but it says that I can not use 'bg' and '-d' at the same time... I also tried ommitting the -g/bg parameter completely but it gave me the same can not open file error).
Can anyone recommend a different software that would fulfil my task or how to get my current strategy working?
Thanks so much, I tried the following: (after running the command you suggested to create the size file)
It returns the following error; "Less than the req'd two fields were encountered in the genome file (mm9_mappability_data_points) at line 100098. Exiting."
I tried looking through the bedgraph documentation but can't find anything where to specify such a size-documenting file... Thanks