MCPcopy
hub / github.com/google-deepmind/alphagenome / main

Function main

scripts/process_gtf.py:84–109  ·  view source on GitHub ↗
(_)

Source from the content-addressed store, hash-verified

82
83
84def main(_) -> None:
85 if not _OUTPUT_PATH.value.endswith('.feather'):
86 raise ValueError('Output path must end with .feather')
87
88 logging.info('Reading GTF from %s', _GTF_PATH.value)
89 gtf = generate_gtf(_GTF_PATH.value)
90
91 logging.info('Writing GTF to %s', _OUTPUT_PATH.value)
92 gtf.to_feather(_OUTPUT_PATH.value)
93
94 if _SPLICE_SITES_OUTPUT_PATH.value is not None:
95 logging.info('Generating splice sites from GTF')
96 splice_sites_starts, splice_sites_ends = generate_splice_sites(gtf)
97
98 splice_sites_start_path = (
99 _SPLICE_SITES_OUTPUT_PATH.value.removesuffix('.feather')
100 + '_starts.feather'
101 )
102 splice_sites_end_path = (
103 _SPLICE_SITES_OUTPUT_PATH.value.removesuffix('.feather')
104 + '_ends.feather'
105 )
106 logging.info('Writing start splice sites to %s', splice_sites_start_path)
107 splice_sites_starts.to_feather(splice_sites_start_path)
108 logging.info('Writing end splice sites to %s', splice_sites_end_path)
109 splice_sites_ends.to_feather(splice_sites_end_path)
110
111
112if __name__ == '__main__':

Callers

nothing calls this directly

Calls 2

generate_gtfFunction · 0.85
generate_splice_sitesFunction · 0.85

Tested by

no test coverage detected