Intersectbed Tool Generating Empty File
1
0
Entering edit mode
12.2 years ago
bioinfo ▴ 840

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
bedtools intersect galaxy • 4.5k views
ADD COMMENT
2
Entering edit mode

in bed files, the chromosome is the first column. It looks like your chromosomes don't match so there can never be overlaps.

ADD REPLY
0
Entering edit mode

So, do you think I need to change my reference file where the first column is gffseqname to NC0077121SODALISGLOSSINIDIUSSTRMORSITANS_CHROMOSOME to get the match?

ADD REPLY
0
Entering edit mode
12.2 years ago

chromosome names don't match (brentp was first)

ADD COMMENT
0
Entering edit mode

I used the galaxy (gff to BED) and the refseq (genebank to gff) link you mentioned last time. It automatically created the reference output file in bed format.

ADD REPLY
0
Entering edit mode

Is there any option to change the column name for my reference in galaxy during converting gff to BED format?

ADD REPLY
0
Entering edit mode

not during conversion but you can use the Text Manipulation tools to Cut the first column and then Add Column as first column with the new chromosome

ADD REPLY
0
Entering edit mode

I have managed to add the new Chromosome column but its coming up as the last column. There is no option to choose a particular column (in my case column 1) you want your new data in. Any other ideas? Here is the new data:

0       4171146 source  0   +   NC_0077121_SODALIS_GLOSSINIDIUS_STR_MORSITANS_CHROMOSOME
0       1395    gene    0   +   NC_0077121_SODALIS_GLOSSINIDIUS_STR_MORSITANS_CHROMOSOME
0       1395    CDS     0   +   NC_0077121_SODALIS_GLOSSINIDIUS_STR_MORSITANS_CHROMOSOME
1397    2498    gene    0   +   NC_0077121_SODALIS_GLOSSINIDIUS_STR_MORSITANS_CHROMOSOME
1397    2498    CDS     0   +   NC_0077121_SODALIS_GLOSSINIDIUS_STR_MORSITANS_CHROMOSOME
2524    3619    gene    0   +   NC_0077121_SODALIS_GLOSSINIDIUS_STR_MORSITANS_CHROMOSOME

And I was wondering how to add 2-3 different chromosomes in the new column. In my case, I have just one chromosome but if it was two then (chr 1, chr 2)?

ADD REPLY
0
Entering edit mode

Here is my B file with modified column 1, still no result. I was wondering if the column need to be exactly similar between two files to get the overlap as still I can see the difference in Chromosome name in column 1 ?
new file B

NC_007712   0       4171146 source  0   +
NC_007712   0       1395    gene    0   +
NC_007712   0       1395    CDS     0   +
NC_007712   1397    2498    gene    0   +
NC_007712   1397    2498    CDS     0   +
ADD REPLY
0
Entering edit mode

the chromosome names need to match EXACTLY

ADD REPLY
0
Entering edit mode

you also need to stop posting a new question when you already suspect what the answer is - you have to make an honest effort otherwise you are just wasting everyone's time - including yours.

ADD REPLY

Login before adding your answer.

Traffic: 813 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6