This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error in gff file

I am trying to use gff with bedtools intersect to get the reads count to the gene. However, it is throwing an error:

Error: Invalid record in file "obtectus_HiC.gff". Record is
HiC_scaffold_1502       maker   gene    -246    584     .       +       .       ID "maker-@000032F|arrow|arrow-snap-gene-3.48"; Name "maker-@000032F|arrow|arrow-snap-gene-3.48";

Any idea how to fix this error in gff. I did not produce this gff file.

bedtools gff

1 answer

-246 as start location of the feature sounds wrong

Thanks. How to fix it. I did not produce the gff.

could you show the record e.g. the cds/exon/mRNA linked to the gene of your case

Here is some part of the gff:

HiC_scaffold_4  maker   three_prime_UTR 64180930    64181706    .   -   .   ID "maker-@000032F|arrow|arrow-augustus-gene-3.44-mRNA-1:three_prime_utr"; Parent "maker-@000032F|arrow|arrow-augustus-gene-3.44-mRNA-1";
HiC_scaffold_1502   maker   gene    -246    584 .   +   .   ID "maker-@000032F|arrow|arrow-snap-gene-3.48"; Name "maker-@000032F|arrow|arrow-snap-gene-3.48";
HiC_scaffold_1502   maker   mRNA    -246    584 .   +   .   ID "maker-@000032F|arrow|arrow-snap-gene-3.48-mRNA-1"; Name "maker-@000032F|arrow|arrow-snap-gene-3.48-mRNA-1"; Parent "maker-@000032F|arrow|arrow-snap-gene-3.48"; _AED "0.31"; _QI "196|1|0.66|1|0.5|0.66|3|0|105"; _eAED "0.35";
HiC_scaffold_4  maker   exon    64163882    64164041    .   -   .   ID "maker-@000032F|arrow|arrow-snap-gene-3.48-mRNA-1:1"; Parent "maker-@000032F|arrow|arrow-snap-gene-3.48-mRNA-1";
HiC_scaffold_1502   maker   exon    85  284 .   +   .   ID "maker-@000032F|arrow|arrow-snap-gene-3.48-mRNA-1:2"; Parent "maker-@000032F|arrow|arrow-snap-gene-3.48-mRNA-1";
HiC_scaffold_1502   maker   exon    431 584 .   +   .   ID "maker-@000032F|arrow|arrow-snap-gene-3.48-mRNA-1:3"; Parent "maker-@000032F|arrow|arrow-snap-gene-3.48-mRNA-1";
HiC_scaffold_1502   maker   CDS 121 284 .   +   0   ID "maker-@000032F|arrow|arrow-snap-gene-3.48-mRNA-1:cds"; Parent "maker-@000032F|arrow|arrow-snap-gene-3.48-mRNA-1";

CDS and exons sounds fine so you can run AGAT it will fix the wrong location at gene and mRNA level (hopping no such error exist at exon or CDS because AGAT does not touch them)

Log in to answer this question.