Uauy-Lab / bioruby-polyploid-tools

Library and tools to deal with polyploid genomics
10 stars 11 forks source link

already initialized constant: Bio::NucleicAcid::IUPAC_CODES #20

Closed FredericBGA closed 4 years ago

FredericBGA commented 4 years ago

Hi,

Wtih ruby 2.3.0 I have a warning:

/softs/add-ons/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/bio-polyploid-tools-1.1.1/lib/bio/BIOExtensions.rb:67: warning: already initialized constant Bio::NucleicAcid::IUPAC_CODES /softs/add-ons/ruby-2.3.0/lib/ruby/gems/2.3.0/gems/bio-samtools-2.6.2/lib/bio/BIOExtensions.rb:3: warning: previous definition of IUPAC_CODES was here

https://github.com/homonecloco/bioruby-polyploid-tools/blob/2a940760e0531c8d6e5462ae5f89665423f8861b/lib/bio/BIOExtensions.rb#L67

Can we safely replace IUPAC_CODES = { with IUPAC_CODES || = { ? I can submit a PR.

homonecloco commented 4 years ago

I think it is safe. Run rake test after doing the change, and it should fail if it has a secondary effect. Thanks, Ricardo

FredericBGA commented 4 years ago

thank you! The PR is submitted.