Ejemplo n.º 1
0
 def testLengthOne(self):
     """
     A FASTA list with just one item gets de-duped to the same one item.
     """
     reads = Reads()
     reads.add(Read('id', 'GGG'))
     self.assertEqual(list(dedupFasta(reads)), [Read('id', 'GGG')])
Ejemplo n.º 2
0
 def testLengthOne(self):
     """
     A FASTA list with just one item gets de-duped to the same one item.
     """
     seq = '>hey\nagtcagtcagtc'
     s1 = SeqIO.read(StringIO(seq), 'fasta')
     self.assertEqual(list(dedupFasta([s1])), [s1])
Ejemplo n.º 3
0
 def testLengthOne(self):
     """
     A FASTA list with just one item gets de-duped to the same one item.
     """
     reads = Reads()
     reads.add(Read('id', 'GGG'))
     self.assertEqual(list(dedupFasta(reads)), [Read('id', 'GGG')])
Ejemplo n.º 4
0
 def testRemovalOfIdenticalSequences(self):
     """
     A list with 2 copies of the same seq is de-duped to have 1 copy.
     """
     reads = Reads()
     reads.add(Read('id', 'GGG'))
     reads.add(Read('id', 'GGG'))
     self.assertEqual(list(dedupFasta(reads)), [Read('id', 'GGG')])
Ejemplo n.º 5
0
 def testRemovalOfIdenticalSequences(self):
     """
     A list with 2 copies of the same seq is de-duped to have 1 copy.
     """
     reads = Reads()
     reads.add(Read('id', 'GGG'))
     reads.add(Read('id', 'GGG'))
     self.assertEqual(list(dedupFasta(reads)), [Read('id', 'GGG')])
Ejemplo n.º 6
0
 def testRemovalOfIdenticalSequencesWithDifferingIds(self):
     """
     A list with 2 copies of the same seq is de-duped to have 1 copy,
     including when the read ids differ.
     """
     reads = Reads()
     reads.add(Read('id1', 'GGG'))
     reads.add(Read('id2', 'GGG'))
     self.assertEqual(list(dedupFasta(reads)), [Read('id1', 'GGG')])
Ejemplo n.º 7
0
 def testRemovalOfIdenticalSequencesWithDifferingIds(self):
     """
     A list with 2 copies of the same seq is de-duped to have 1 copy,
     including when the read ids differ.
     """
     reads = Reads()
     reads.add(Read('id1', 'GGG'))
     reads.add(Read('id2', 'GGG'))
     self.assertEqual(list(dedupFasta(reads)), [Read('id1', 'GGG')])
Ejemplo n.º 8
0
 def testRemovalOfIdenticalSequences(self):
     """A list with 2 copies of the same seq is de-duped to have 1 copy."""
     seq = '>hey\nagtcagtcagtc'
     s1 = SeqIO.read(StringIO(seq), 'fasta')
     s2 = SeqIO.read(StringIO(seq), 'fasta')
     self.assertEqual(list(dedupFasta([s1, s2])), [s1])
Ejemplo n.º 9
0
 def testEmpty(self):
     """An empty FASTA list gets de-duped to an empty list."""
     self.assertEqual(list(dedupFasta([])), [])
Ejemplo n.º 10
0
 def testEmpty(self):
     """
     An empty FASTA list gets de-duped to an empty list.
     """
     self.assertEqual(list(dedupFasta([])), [])