Skip to content

Commit

Permalink
enabling skipping unexpected gene annotation records that lack the mR…
Browse files Browse the repository at this point in the history
…NA info
  • Loading branch information
yjx1217 committed May 25, 2022
1 parent 2c9822d commit 16e4eea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions simuG.pl
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,11 @@ sub analyze_coding_partition {
my $gene_end = $$gene_gff_hashref{$gene_id}{'end'};
my $gene_strand = $$gene_gff_hashref{$gene_id}{'strand'};
my %mRNA_length = ();
# print "gene_id=$gene_id\n";
if (not exists $$gene_gff_hashref{$gene_id}{'mRNA'}) {
# skip unexpected cases such as ENSG00000188403 that lacks the mRNA track in Ensembl's GFF3 file
next;
}
foreach my $mRNA_id (sort keys %{$$gene_gff_hashref{$gene_id}{'mRNA'}}) {
my $mRNA_length = $$gene_gff_hashref{$gene_id}{'mRNA'}{$mRNA_id}{'end'} - $$gene_gff_hashref{$gene_id}{'mRNA'}{$mRNA_id}{'start'} + 1;
$mRNA_length{$mRNA_id} = $mRNA_length;
Expand Down

0 comments on commit 16e4eea

Please sign in to comment.