forked from ga4gh/ga4gh-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add infrastructure for ga2vcf and ga2sam tools
Does not close ga4gh#83
- Loading branch information
Showing
5 changed files
with
120 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
""" | ||
Shim for running the ga2sam tool during development | ||
""" | ||
from __future__ import division | ||
from __future__ import print_function | ||
from __future__ import unicode_literals | ||
|
||
import ga4gh.cli | ||
|
||
if __name__ == "__main__": | ||
ga4gh.cli.ga2sam_main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
""" | ||
Shim for running the ga2vcf tool during development | ||
""" | ||
from __future__ import division | ||
from __future__ import print_function | ||
from __future__ import unicode_literals | ||
|
||
import ga4gh.cli | ||
|
||
if __name__ == "__main__": | ||
ga4gh.cli.ga2vcf_main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
""" | ||
Provides classes that take protocol requests, send that request to | ||
the server, and write a particular genomics file type with the results. | ||
""" | ||
from __future__ import division | ||
from __future__ import print_function | ||
from __future__ import unicode_literals | ||
|
||
|
||
class AbstractConverter(object): | ||
""" | ||
Abstract base class for converter classes | ||
""" | ||
def __init__(self, request, outputStream): | ||
self._request = request | ||
self._outputStream = outputStream | ||
|
||
|
||
class SamConverter(AbstractConverter): | ||
""" | ||
Converts a request to a SAM file | ||
""" | ||
def __init__(self, searchReadsRequest, outputStream): | ||
super(SamConverter, self).__init__( | ||
searchReadsRequest, outputStream) | ||
|
||
def convert(self): | ||
raise NotImplementedError() | ||
|
||
|
||
class VcfConverter(AbstractConverter): | ||
""" | ||
Converts a request to a VCF file | ||
""" | ||
def __init__(self, searchVariantsRequest, outputStream): | ||
super(VcfConverter, self).__init__( | ||
searchVariantsRequest, outputStream) | ||
|
||
def convert(self): | ||
raise NotImplementedError() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters