73ec9752604a0a0210fafa0722ca355629648502,nucleus/io/fasta.py,InMemoryRefReader,__init__,#InMemoryRefReader#Any#,115

Before Change


      if start < 0:
        raise ValueError("start={} must be >= for chromosome={}".format(
            start, contig_name))
      if contig_name in self._chroms:
        raise ValueError("Duplicate chromosome={} detect".format(contig_name))
      if not bases:
        raise ValueError(
            "Bases must contain at least one base, but got "{}"".format(bases))

      end = start + len(bases)
      self._chroms[contig_name] = _InMemoryChromosome(start, end, bases)
      contigs.append(
          reference_pb2.ContigInfo(
              name=contig_name, n_bases=end, pos_in_fasta=i))

After Change


    
    super(InMemoryRefReader, self).__init__()

    ref_seqs = []
    contigs = []
    for i, (contig_name, start, bases) in enumerate(chromosomes):
      if start < 0:
        raise ValueError("start={} must be >= for chromosome={}".format(
            start, contig_name))
      if not bases:
        raise ValueError(
            "Bases must contain at least one base, but got "{}"".format(bases))

      end = start + len(bases)
      ref_seqs.append(reference_pb2.ReferenceSequence(
          region=ranges.make_range(contig_name, start, end), bases=bases))
      contigs.append(
          reference_pb2.ContigInfo(
              name=contig_name, n_bases=end, pos_in_fasta=i))

    self._reader = fasta_reader.InMemoryGenomeReference.create(
        contigs, ref_seqs)
    self.header = RefFastaHeader(contigs=self._reader.contigs)

  def iterate(self):
    raise NotImplementedError("Can not iterate through a FASTA file")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: google/nucleus
Commit Name: 73ec9752604a0a0210fafa0722ca355629648502
Time: 2018-04-23
Author: mdepristo@google.com
File Name: nucleus/io/fasta.py
Class Name: InMemoryRefReader
Method Name: __init__


Project Name: google/deepvariant
Commit Name: 4d934160aa7f4f9f1d5cdea7cd0e66cfc3d43d05
Time: 2018-04-29
Author: mdepristo@google.com
File Name: third_party/nucleus/io/fasta.py
Class Name: InMemoryRefReader
Method Name: __init__


Project Name: pyprob/pyprob
Commit Name: a277fd89980f7a4647d0a17548aba7df37a5aefb
Time: 2018-09-19
Author: atilimgunes.baydin@gmail.com
File Name: pyprob/nn/inference_network_feedforward.py
Class Name: InferenceNetworkFeedForward
Method Name: _embed_observe