Esempio 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')])
Esempio 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])
Esempio 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')])
Esempio 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')])
Esempio 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')])
Esempio 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')])
Esempio 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')])
Esempio 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])
Esempio n. 9
0
 def testEmpty(self):
     """An empty FASTA list gets de-duped to an empty list."""
     self.assertEqual(list(dedupFasta([])), [])
Esempio n. 10
0
 def testEmpty(self):
     """
     An empty FASTA list gets de-duped to an empty list.
     """
     self.assertEqual(list(dedupFasta([])), [])