ALLHiC
ALLHiC copied to clipboard
gmap2AlleleTable.pl error: Use of uninitialized value $gene in substitution (s///) at gmap2AlleleTable.pl line 20
Hi, @tangerzhang , sorry for disturb you. When I want to use gmap2AlleleTable.pl to aquire the Allelic.contig.table I encountered an error as below: [Use of uninitialized value $gene in substitution (s///) at gmap2AlleleTable.pl line 20, line 28232. Use of uninitialized value $gene in exists at gmap2AlleleTable.pl line 21, line 28232.]
My gmap.gff3 contents like this: ctg000450 gramineusDB gene 5520161 5699876 . + . ID=contig029.path1;Name=contig029;Dir=sense ctg000450 gramineusDB mRNA 5520161 5699876 . + . ID=contig029.mrna1;Name=contig029;Parent=contig029.path1 ctg000450 gramineusDB exon 5520161 5522253 52 + . ID=contig029.mrna1.exon1;Name=contig029;Parent=contig029 ctg000450 gramineusDB exon 5522283 5522345 96 + . ID=contig029.mrna1.exon2;Name=contig029;Parent=contig029 ctg000450 gramineusDB exon 5523878 5524494 91 + . ID=contig029.mrna1.exon3;Name=contig029;Parent=contig029 ctg000450 gramineusDB exon 5524509 5524876 86 + . ID=contig029.mrna1.exon4;Name=contig029;Parent=contig029 ctg000450 gramineusDB exon 5524906 5524917 100 + . ID=contig029.mrna1.exon5;Name=contig029;Parent=contig029 ctg000450 gramineusDB exon 5524945 5526152 92 + . ID=contig029.mrna1.exon6;Name=contig029;Parent=contig029 ctg000450 gramineusDB exon 5531519 5531763 77 + . ID=contig029.mrna1.exon7;Name=contig029;Parent=contig029 ctg000450 gramineusDB exon 5531803 5531904 39 + . ID=contig029.mrna1.exon8;Name=contig029;Parent=contig029 ctg000450 gramineusDB exon 5531927 5531944 88 + . ID=contig029.mrna1.exon9;Name=contig029;Parent=contig029 ctg000450 gramineusDB exon 5545430 5545482 88 + . ID=contig029.mrna1.exon10;Name=contig029;Parent=contig02 ctg000450 gramineusDB exon 5545656 5545933 78 + . ID=contig029.mrna1.exon11;Name=contig029;Parent=contig02 ctg000450 gramineusDB exon 5550215 5550222 100 + . ID=contig029.mrna1.exon13;Name=contig029;Parent=contig02 ctg000450 gramineusDB exon 5552476 5552491 81 + . ID=contig029.mrna1.exon14;Name=contig029;Parent=contig02 ctg000450 gramineusDB exon 5552498 5553060 84 + . ID=contig029.mrna1.exon15;Name=contig029;Parent=contig02 ctg000450 gramineusDB exon 5597057 5597064 100 + . ID=contig029.mrna1.exon16;Name=contig029;Parent=contig02
And my reference.gff3 format like this: chr1 evm gene 109407 114443 . + . ID=ATA1.1 chr1 evm mRNA 109407 114443 . + . ID=ATA1.1.t1;Parent=ATA1.1 chr1 evm exon 109407 110469 . + . ID=ATA1.1.t1.exon1;Parent=ATA1.1.t1 chr1 evm CDS 109407 110469 . + 0 ID=ATA1.1.t1.CDS1;Parent=ATA1.1.t1 chr1 evm exon 110734 110808 . + . ID=ATA1.1.t1.exon2;Parent=ATA1.1.t1 chr1 evm CDS 110734 110808 . + 2 ID=ATA1.1.t1.CDS2;Parent=ATA1.1.t1 chr1 evm exon 111325 111539 . + . ID=ATA1.1.t1.exon3;Parent=ATA1.1.t1 chr1 evm CDS 111325 111539 . + 2 ID=ATA1.1.t1.CDS3;Parent=ATA1.1.t1 chr1 evm exon 112391 112614 . + . ID=ATA1.1.t1.exon4;Parent=ATA1.1.t1 chr1 evm CDS 112391 112614 . + 0 ID=ATA1.1.t1.CDS4;Parent=ATA1.1.t1 chr1 evm exon 113798 114443 . + . ID=ATA1.1.t1.exon5;Parent=ATA1.1.t1 chr1 evm CDS 113798 114443 . + 1 ID=ATA1.1.t1.CDS5;Parent=ATA1.1.t1 chr1 evm gene 118993 126684 . + . ID=ATA1.2 chr1 evm mRNA 118993 126684 . + . ID=ATA1.2.t1;Parent=ATA1.2 chr1 evm five_prime_UTR 118993 119178 . + . ID=ATA1.2.t1.utr5p1;Parent=ATA1.2.t1 chr1 evm exon 118993 119317 . + . ID=ATA1.2.t1.exon1;Parent=ATA1.2.t1 chr1 evm CDS 119179 119317 . + 0 ID=ATA1.2.t1.CDS1;Parent=ATA1.2.t1 chr1 evm exon 119923 119996 . + . ID=ATA1.2.t1.exon2;Parent=ATA1.2.t1 chr1 evm CDS 119923 119996 . + 2 ID=ATA1.2.t1.CDS2;Parent=ATA1.2.t1 chr1 evm exon 121241 121324 . + . ID=ATA1.2.t1.exon3;Parent=ATA1.2.t1 chr1 evm CDS 121241 121324 . + 0 ID=ATA1.2.t1.CDS3;Parent=ATA1.2.t1 chr1 evm exon 121423 121503 . + . ID=ATA1.2.t1.exon4;Parent=ATA1.2.t1 chr1 evm CDS 121423 121503 . + 0 ID=ATA1.2.t1.CDS4;Parent=ATA1.2.t1
I think the format of reference.gff3 was normal format, of course, I've tried using gmap2AlleleTableBED.pl and encountered the same error, could you please tell me how to modify perl script or file contents to acquire the Allelic.contig.table I want?
@Huangxc01 the gmap2AlleleTable.pl can only extract gene name with key "Name" in the column 9 of reference.gff3, but as the file you post here, there no any "Name" in the file, so the script cannot parse it. For solving this problem, there are two choices to do it
- use command sed 's/ID=/Name=/g' reference.gff3 > new_ref.gff3 to generate a new gff3
- modify the string "Name" in the line 19 of gmap2AlleleTable.pl to string "ID".
Thanks for your timely reply, I have resolved the error in my gff3 file. Thanks again!