I have used the Bedtools command intersectBed to check the overlap between two bed files. A is my INDEL file and B is my Reference file. But it is producing an empty output file. I thought the problem was that the file B is much larger than file A. But I tried changing the file order and it is still not creating any output.
Here is the reference B file (larger):
gff_seqname 0 1395 gene 0 +
gff_seqname 0 1395 exon 0 +
gff_seqname 1397 2498 gene 0 +
gff_seqname 1397 2498 exon 0 +
gff_seqname 2524 3619 gene 0 +
Here is my A file with just 51 INDELS:
NC_0077121_SODALIS_GLOSSINIDIUS_STR_MORSITANS_CHROMOSOME 174708 174713 -GCCGG:2/6
NC_0077121_SODALIS_GLOSSINIDIUS_STR_MORSITANS_CHROMOSOME 1078686 1078686 +A:105/112
NC_0077121_SODALIS_GLOSSINIDIUS_STR_MORSITANS_CHROMOSOME 1229123 1229125 -CT:800/870
NC_0077121_SODALIS_GLOSSINIDIUS_STR_MORSITANS_CHROMOSOME 1234830 1234830 +AT:134/134
NC_0077121_SODALIS_GLOSSINIDIUS_STR_MORSITANS_CHROMOSOME 1234833 1234834 -A:134/134
here is my command:
intersectBed -a SOD_pal_BWA_GMM.PE.sorted.bam.sorted_cleaned_GMM.bam.sorted.hr.bam.raw.bed -b sodalis_galaxy.bed -wa -wb >test13.bed
in bed files, the chromosome is the first column. It looks like your chromosomes don't match so there can never be overlaps.
So, do you think I need to change my reference file where the first column is gffseqname to NC0077121SODALISGLOSSINIDIUSSTRMORSITANS_CHROMOSOME to get the match?