<commit_before>#!/usr/bin/env python
"""dbSNP - genetic variation within and across different species."""

# We can use another GATK resource since it's pretty much the same
from example import Resource as iResource


class Resource(iResource):
  """docstring for dbSNP Resource"""
  def __init__(self):
    super(Resource, self).__init__()

    self.id = "dbsnp"

    self.parts = 1
    self.names = ["dbsnp.vcf.gz"]

  def paths(self, version):
    bundle_id, assembly = self.defineVersion(version)

    if bundle_id == self.latest():
      num = "138"
    else:
      num = "137"

    # 1 file
    base = "{base}/{bundle}/{assembly}".format(base=self.baseUrl,
                                               bundle=bundle_id,
                                               assembly=assembly)
    f = "dbsnp_{num}.{assembly}.vcf.gz".format(num=num, assembly=assembly)

    return ["{base}/{file}".format(base=base, file=f)]
<commit_msg>Fixes bug in naming dbSNP resource download path (137/138)<commit_after>#!/usr/bin/env python
"""dbSNP - genetic variation within and across different species."""

# We can use another GATK resource since it's pretty much the same
from example import Resource as iResource


class Resource(iResource):
  """docstring for dbSNP Resource"""
  def __init__(self):
    super(Resource, self).__init__()

    self.id = "dbsnp"

    self.parts = 1
    self.names = ["dbsnp.vcf.gz"]

  def paths(self, version):
    bundle_id, assembly = self.defineVersion(version)

    if float(bundle_id) == self.latest():
      num = '138'
    else:
      num = '137'

    # 1 file
    base = "{base}/{bundle}/{assembly}".format(base=self.baseUrl,
                                               bundle=bundle_id,
                                               assembly=assembly)
    f = "dbsnp_{num}.{assembly}.vcf.gz".format(num=num, assembly=assembly)

    return ["{base}/{file}".format(base=base, file=f)]

{'fraction_non_alphanumeric': 0.13136033229491173, 'fraction_numerical': 0.01142263759086189, 'mean_word_length': 2.5036363636363634, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3362757', 'n_tokens_mistral': 600, 'n_tokens_neox': 558, 'n_words': 148}