Exemple #1
0
    def test_all_citations(self):
        """Test _all_citations() method"""
        class MockObject(object):
            pass

        c1 = ihm.Citation(title='Test paper',
                          journal='J Mol Biol',
                          volume=45,
                          page_range=(1, 20),
                          year=2016,
                          authors=['Smith A', 'Jones B'],
                          doi='10.2345/S1384107697000225',
                          pmid='1234')
        c2 = ihm.Citation(title='Test paper',
                          journal='J Mol Biol',
                          volume=45,
                          page_range=(1, 20),
                          year=2016,
                          authors=['Smith A', 'Jones B'],
                          doi='1.2.3.4',
                          pmid='1234')
        rsr1 = MockObject()  # Not a 3dem restraint
        rsr2 = MockObject()  # 3dem but with no provided citation
        rsr2.fitting_method_citation_id = None
        rsr3 = MockObject()
        rsr2.fitting_method_citation_id = c1

        s = ihm.System()
        s.restraints.extend((rsr1, rsr2, rsr3))
        s.citations.extend((c2, c2))
        # duplicates should be filtered globally
        self.assertEqual(list(s._all_citations()), [c2, c1])
Exemple #2
0
    def test_all_citations(self):
        """Test _all_citations() method"""
        class MockObject(object):
            pass

        c1 = ihm.Citation(title='Test paper',
                          journal='J Mol Biol',
                          volume=45,
                          page_range=(1, 20),
                          year=2016,
                          authors=['Smith A', 'Jones B'],
                          doi='10.2345/S1384107697000225',
                          pmid='1234')
        c2 = ihm.Citation(title='Test paper',
                          journal='J Mol Biol',
                          volume=45,
                          page_range=(1, 20),
                          year=2016,
                          authors=['Smith A', 'Jones B'],
                          doi='1.2.3.4',
                          pmid='1234')
        c3 = ihm.Citation(title='Test paper2',
                          journal='J Mol Biol2',
                          volume=46,
                          page_range=(1, 20),
                          year=2017,
                          authors=['Smith A', 'Jones B'],
                          doi='5.6.7.8',
                          pmid='5678')
        rsr1 = MockObject()  # Not a 3dem restraint
        rsr2 = MockObject()  # 3dem but with no provided citation
        rsr2.fitting_method_citation_id = None
        rsr3 = MockObject()
        rsr2.fitting_method_citation_id = c1

        s1 = ihm.Software(name='test',
                          classification='test code',
                          description='Some test program',
                          version=1,
                          location='http://test.org')
        s2 = ihm.Software(name='test',
                          classification='test code',
                          description='Some test program',
                          version=1,
                          location='http://test.org',
                          citation=c3)

        s = ihm.System()
        s.restraints.extend((rsr1, rsr2, rsr3))
        s.citations.extend((c2, c2))
        s.software.extend((s1, s2))
        # duplicates should be filtered globally
        self.assertEqual(list(s._all_citations()), [c2, c3, c1])
Exemple #3
0
 def test_citation(self):
     """Test Citation class"""
     s = ihm.Citation(title='Test paper', journal='J Mol Biol',
                      volume=45, page_range=(1,20), year=2016,
                      authors=['Smith A', 'Jones B'],
                      doi='10.2345/S1384107697000225',
                      pmid='1234')
     self.assertEqual(s.title, 'Test paper')
Exemple #4
0
def mock_from_pubmed(cls, pubmed_id):
    return ihm.Citation(
            pmid=30190596,
            title='Architecture of Pol II(G) and molecular mechanism of '
                  'transcription regulation by Gdown1.',
            journal='Nat Struct Mol Biol', volume=25, page_range=(859,867),
            year=2018, doi='10.1038/s41594-018-0118-5', authors=[
                'Jishage M', 'Yu X', 'Shi Y', 'Ganesan SJ', 'Chen WY',
                'Sali A', 'Chait BT', 'Asturias FJ', 'Roeder RG'])
def mock_from_pubmed(cls, pubmed_id):
    return ihm.Citation(
        pmid=32719457,
        title='Structural basis of CD4 downregulation by HIV-1 Nef',
        journal='Nat Struct Mol Biol',
        volume=None,
        page_range=None,
        year=2020,
        doi='10.1038/s41594-020-0463-z',
        authors=[
            'Kwon Y', 'Kaake RM', 'Echeverria I', 'Suarez M',
            'Karimian Shamsabadi M', 'Stoneham C', 'Ramirez PW', 'Kress J',
            'Singh R', 'Sali A', 'Krogan N,'
            'Guatelli J', 'Jia X'
        ])
Exemple #6
0
"""Citations for some commonly-used software packages.

   Each of these is an instance of the :class:`ihm.Citation` class,
   and so can be used anywhere these objects are required, generally for
   :class:`ihm.Software`.
"""

import ihm

imp = ihm.Citation(
    pmid='22272186',
    title='Putting the pieces together: integrative modeling platform '
    'software for structure determination of macromolecular assemblies',
    journal='PLoS Biol',
    volume=10,
    page_range='e1001244',
    year=2012,
    authors=[
        'Russel D', 'Lasker K', 'Webb B', 'Velázquez-Muriel J', 'Tjioe E',
        'Schneidman-Duhovny D', 'Peterson B', 'Sali A'
    ],
    doi='10.1371/journal.pbio.1001244')

pmi = ihm.Citation(
    pmid='31396911',
    title='Modeling Biological Complexes Using Integrative Modeling Platform.',
    journal='Methods Mol Biol',
    volume=2022,
    page_range=(353, 377),
    year=2019,
    authors=[