4.5 years ago by
You can use getFasta to generate fasta file for your reference file and can then query using the second file, what is the nucleotide frequency. Use nucBed for that, no official documentation yet but from command line help, you can get the hints.
Tool: bedtools nuc (aka nucBed)
Summary: Profiles the nucleotide content of intervals in a fasta file.
Usage: bedtools nuc [OPTIONS] -fi <fasta> -bed <bed/gff/vcf>
-fi Input FASTA file
-bed BED/GFF/VCF file of ranges to extract from -fi
-s Profile the sequence according to strand.
-seq Print the extracted sequence
-pattern Report the number of times a user-defined sequence
is observed (case-sensitive).
-C Igore case when matching -pattern. By defaulty, case matters.
The following information will be reported after each BED entry:
1) %AT content
2) %GC content
3) Number of As observed
4) Number of Cs observed
5) Number of Gs observed
6) Number of Ts observed
7) Number of Ns observed
8) Number of other bases observed
9) The length of the explored sequence/interval.
10) The seq. extracted from the FASTA file. (opt., if -seq is used)
11) The number of times a user's pattern was observed.
(opt., if -pattern is used.)