Hi, I would like to request your help with re-assembling a transcriptome using a .bed file. I have a bad assembly that has parts with no coverage so I used bedtools to remove those sites and merged the remaining:
bedtools genomecov -bga -ibam ./PrairieSmoke/Assemblies/WG_assembly.sorted.bam -g ./PrairieSmoke/Assemblies/WG_assembly.fasta |
awk '$4==0' |
bedtools merge -i - \
> ./PrairieSmoke/WG_assembly.bed
My question is how can I use this .bed file to reassembly? The ideia is to repeat the assembly after having removed those sites with no coverage with the hope of improving said assembly. Thanks in advance, Pam
Also, if you do not want 0 coverage regions do not use -bga flag, just use -bg. The -bga means bed graph all, as in output all positions, even those with 0 coverage. If you just use the -bg flag, you will only output regions with coverage. There is no reason to use -bga if you do not want regions with 0 coverage. This will totally eliminate the need for the awk step above. Understand your tools before you use them!