def test_getOrganism(self): """ Test that the Sequence object returns correctly the organism value. """ print 'Running %s ...' % getName() s1 = self.sequenceListingFixture.create_sequence_instance(self.sequenceListing) self.assertEqual('H**o sapiens', s1.getOrganism()) s2 = Sequence.objects.create( sequenceListing = self.sequenceListing, moltype = 'AA', residues = 'MRTAVTAD') self.assertEqual(None, s2.getOrganism()) views.feature_source_helper(s2, 'Drosophila melanogaster') self.assertEqual('Drosophila melanogaster', s2.getOrganism()) s3 = Sequence.objects.create( sequenceListing = self.sequenceListing, moltype = 'RNA', residues = 'caucaucaucaucaucau') views.feature_source_helper(s3, 'Mus musculus') self.assertEqual('Mus musculus', s3.getOrganism())
def create_custom_sequence_instance(self, sl, mt, res, org): seq = Sequence.objects.create( sequenceListing = sl, moltype = mt, residues = res) views.feature_source_helper(seq, org) return seq
def create_sequence_instance(self, sl): seq = Sequence.objects.create( sequenceListing = sl, moltype = 'DNA', residues = 'catcatcatcatcatcat') views.feature_source_helper(seq, 'H**o sapiens') return seq
def create_sequence_instance(self, sl): currentSeqIdNo = len(sl.sequence_set.all()) + 1 currentSequenceName = 'test_seq_%i' % currentSeqIdNo seq = Sequence.objects.create(sequenceListing=sl, sequenceName=currentSequenceName, moltype='DNA', residues='catcatcatcatcatcat') views.feature_source_helper(seq, 'H**o sapiens', 'genomic DNA') return seq
def create_custom_sequence_instance(self, sl, mt, res, org, mtq): currentSeqIdNo = len(sl.sequence_set.all()) + 1 currentSequenceName = 'test_seq_%i' % currentSeqIdNo seq = Sequence.objects.create(sequenceListing=sl, sequenceName=currentSequenceName, moltype=mt, residues=res) views.feature_source_helper(seq, org, mtq) return seq
def test_getOrganism(self): """ Test that the Sequence object returns correctly the organism value. """ print 'Running %s ...' % getName() s1 = self.sequenceListingFixture.create_sequence_instance( self.sequenceListing) self.assertEqual('H**o sapiens', s1.getOrganism()) s2 = Sequence.objects.create(sequenceListing=self.sequenceListing, moltype='AA', residues='MRTAVTAD') self.assertEqual(None, s2.getOrganism()) views.feature_source_helper(s2, 'Drosophila melanogaster', 'protein') self.assertEqual('Drosophila melanogaster', s2.getOrganism()) s3 = Sequence.objects.create(sequenceListing=self.sequenceListing, moltype='RNA', residues='caucaucaucaucaucau') views.feature_source_helper(s3, 'Mus musculus', 'genomic RNA') self.assertEqual('Mus musculus', s3.getOrganism())