I am very new to genomics and have been given scripts from other bioinformaticians to learn from. Within these scripts they used specific .bed files to analyse a panel of genes and perform annotation.
I understand there are methods of turning a .fasta file or a .bam file into a .bed file. However, I do not understand how to extract information from specific genes e.g. how to create a .bed file which maps all the collagen genes or how to create a .bed file with only exons.
Does anyone know the process of performing such analysis, or know of any databases where .bed files may be stored?
Thank you for this detailed answer. BEDOPS seems like a wonderful tool.
Your question is a bit vague because it is not clear what your bed file contains. Typically, your bam file contains mapped reads, which you can immediately use and convert into a bed file. However, you can also use the bam file for a region counting or differential expression, resulting in a bed or bed like file. So make sure you really understand the content of your bed file.
If you are given (produced) a bed file and now want to filter for specific regions, then you would, for example, apply bedtools intersect. Thus, you would intersect your bedfile with a reference that contains your regions of interest (e.g., exons or annotated genes). The reference file you can get from standard databases, such as UCSC or GENCODE.
Thank you for your answer. You are right, I am quite naïve about bed files. Thank you for the information though, and the resources you highlighted seem very helpful.