localpdb/PDBDownloader.py
def fetch_major_revisions(self, merged=False):
        """
        Check with RCSB graphql API for major revisions (i.e. the coordinate changes) for modified entries downloaded
        by the self.download() function.
        @param merged: Denotes whether modified entries are a weekly RCSB update or merged updates over multiple versions.
        @return: True if check succeeded, False otherwise
        """
        in_fn = f'{self.db_path}/data/{self.version}/modified_merged.txt' \
            if merged else f'{self.db_path}/data/{self.version}/modified.txt'
        out_fn = f'{self.db_path}/data/{self.version}/modified_major_merged.txt' \
            if merged else f'{self.db_path}/data/{self.version}/modified_major.txt'
        with open(in_fn) as f:
            entries = {line.rstrip() for line in f}
        try:
            modified_dict = query_major_revisions(entries, self.versions[0], self.versions[-1]) \
                if merged else query_major_revisions(entries, self.version, self.version)
        except requests.exceptions.RequestException:
            return {}, False
        with open(out_fn, 'w') as f:
            for id_ in modified_dict.keys():
                f.write(f'{id_}\n')
        return modified_dict, True

        Check with RCSB graphql API for major revisions (i.e. the coordinate changes) for modified entries downloaded
        by the self.download() function.
        @param merged: Denotes whether modified entries are a weekly RCSB update or merged updates over multiple versions.
        @return: True if check succeeded, False otherwise
        
Check with RCSB graphql API for major revisions  for modified entries downloaded
by the self.download() function.
Check with RCSB graphql API for major revisions for modified entries downloaded by the self . download () function .
def fetch_major_revisions(self, merged=False):
        in_fn = f'{self.db_path}/data/{self.version}/modified_merged.txt' \
            if merged else f'{self.db_path}/data/{self.version}/modified.txt'
        out_fn = f'{self.db_path}/data/{self.version}/modified_major_merged.txt' \
            if merged else f'{self.db_path}/data/{self.version}/modified_major.txt'
        with open(in_fn) as f:
            entries = {line.rstrip() for line in f}
        try:
            modified_dict = query_major_revisions(entries, self.versions[0], self.versions[-1]) \
                if merged else query_major_revisions(entries, self.version, self.version)
        except requests.exceptions.RequestException:
            return {}, False
        with open(out_fn, 'w') as f:
            for id_ in modified_dict.keys():
                f.write(f'{id_}\n')
        return modified_dict, True
def fetch_major_revisions ( self , merged = False ) : in_fn = f'{self.db_path}/data/{self.version}/modified_merged.txt' if merged else f'{self.db_path}/data/{self.version}/modified.txt' out_fn = f'{self.db_path}/data/{self.version}/modified_major_merged.txt' if merged else f'{self.db_path}/data/{self.version}/modified_major.txt' with open ( in_fn ) as f : entries = { line . rstrip ( ) for line in f } try : modified_dict = query_major_revisions ( entries , self . versions [ 0 ] , self . versions [ - 1 ] ) if merged else query_major_revisions ( entries , self . version , self . version ) except requests . exceptions . RequestException : return { } , False with open ( out_fn , 'w' ) as f : for id_ in modified_dict . keys ( ) : f . write ( f'{id_}\n' ) return modified_dict , True
Check with RCSB graphql API for major revisions (i.e.
Check with RCSB graphql API for major revisions ( i . e .
"""
        Check with RCSB graphql API for major revisions (i.e. the coordinate changes) for modified entries downloaded
        by the self.download() function.
        @param merged: Denotes whether modified entries are a weekly RCSB update or merged updates over multiple versions.
        @return: True if check succeeded, False otherwise
        """
True if check succeeded, False otherwise
True if check succeeded False otherwise
self
merged
Denotes whether modified entries are a weekly RCSB update or merged updates over multiple versions.
Denotes whether modified entries are a weekly RCSB update or merged updates over multiple versions .