Entering edit mode
4.1 years ago
MEITUO
▴
10
HI everyone!
i am trying to calculate the gene distance of assembly contigs by closest-features. but this tool requires a bed format input file. how can i get this bed-format file?
What kind of data do you have? Could you please share more details?
metagenic data, the contigs after assembly
if you have the bam format you can use
bedtools bamtobed
(see here).Then you can use
bedtools closest
(see here) to intersect the bed file obtained earlier with the features (also in bed). If you specify the-d
flag, it will report the distance as well.thanks! and is the bam file that the qc reads mapping back to assembly contig? do this need filter low mapped reads or just can use it directly after bwa or bowite??
That I didn't get it sorry... Please explain better what you mean. If you have doubts about what a bam file is, you should spend some time familiarizing with the file types used in bioinformatics. See here for a short description of the most common file types in bioinformatics.