File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Rfam/Schemata/RfamLive/ResultSet Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,16 @@ sub updateRfamseqFromFamilyObj {
109109 croak " ERROR in $sub_name , invalid source read from seed info hash, valid values are \" SEED:GenBank\" and \" SEED:RNAcentral\" but read $source " ;
110110 }
111111
112+ # enforce maximum number of characters for each value,
113+ # for overflows in description we just truncate, overflow in others are fatal
114+ if (length ($seed_name ) > 20) { croak " ERROR in $sub_name , rfamseq_acc $seed_name exceeds 20 characters" ; }
115+ if (length ($accession ) > 15) { croak " ERROR in $sub_name , accession $accession exceeds 15 characters" ; }
116+ if (length ($version ) > 6) { croak " ERROR in $sub_name , version $version exceeds 6 characters" ; }
117+ if (length ($ncbi_id ) > 10) { croak " ERROR in $sub_name , ncbi_id $ncbi_id exceeds 10 characters" ; }
118+ if (length ($length ) > 10) { croak " ERROR in $sub_name , length $length exceeds 10 characters" ; }
119+ if (length ($source ) > 20) { croak " ERROR in $sub_name , source $source exceeds 20 characters" ; }
120+ if (length ($description ) > 250) { $description = substr ($description , 0, 250); }
121+
112122 push (@row_AH , { rfamseq_acc => $seed_name ,
113123 accession => $accession ,
114124 version => $version ,
You can’t perform that action at this time.
0 commit comments