id
int32
0
252k
repo
stringlengths
7
55
path
stringlengths
4
127
func_name
stringlengths
1
88
original_string
stringlengths
75
19.8k
language
stringclasses
1 value
code
stringlengths
75
19.8k
code_tokens
list
docstring
stringlengths
3
17.3k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
87
242
251,800
xgvargas/smartside
smartside/signal.py
SmartSignal.auto_connect
def auto_connect(self): """ Make a connection between every member function to a GUI signal. Every member function whose name is in format: '_on_' + <widget_name> + '__' + <widget_signal_name> are connected to the signal of a GUI widget if it exists. Also, every funct...
python
def auto_connect(self): """ Make a connection between every member function to a GUI signal. Every member function whose name is in format: '_on_' + <widget_name> + '__' + <widget_signal_name> are connected to the signal of a GUI widget if it exists. Also, every funct...
[ "def", "auto_connect", "(", "self", ")", ":", "for", "o", "in", "dir", "(", "self", ")", ":", "if", "o", ".", "startswith", "(", "'_on_'", ")", "and", "'__'", "in", "o", ":", "func", "=", "getattr", "(", "self", ",", "o", ")", "wgt", ",", "sig"...
Make a connection between every member function to a GUI signal. Every member function whose name is in format: '_on_' + <widget_name> + '__' + <widget_signal_name> are connected to the signal of a GUI widget if it exists. Also, every function with format: '_when_' + <group_...
[ "Make", "a", "connection", "between", "every", "member", "function", "to", "a", "GUI", "signal", "." ]
c63acb7d628b161f438e877eca12d550647de34d
https://github.com/xgvargas/smartside/blob/c63acb7d628b161f438e877eca12d550647de34d/smartside/signal.py#L60-L96
251,801
xgvargas/smartside
smartside/signal.py
SmartSignal.print_signals_and_slots
def print_signals_and_slots(self): """ List all active Slots and Signal. Credits to: http://visitusers.org/index.php?title=PySide_Recipes#Debugging """ for i in xrange(self.metaObject().methodCount()): m = self.metaObject().method(i) if m.methodType() =...
python
def print_signals_and_slots(self): """ List all active Slots and Signal. Credits to: http://visitusers.org/index.php?title=PySide_Recipes#Debugging """ for i in xrange(self.metaObject().methodCount()): m = self.metaObject().method(i) if m.methodType() =...
[ "def", "print_signals_and_slots", "(", "self", ")", ":", "for", "i", "in", "xrange", "(", "self", ".", "metaObject", "(", ")", ".", "methodCount", "(", ")", ")", ":", "m", "=", "self", ".", "metaObject", "(", ")", ".", "method", "(", "i", ")", "if"...
List all active Slots and Signal. Credits to: http://visitusers.org/index.php?title=PySide_Recipes#Debugging
[ "List", "all", "active", "Slots", "and", "Signal", "." ]
c63acb7d628b161f438e877eca12d550647de34d
https://github.com/xgvargas/smartside/blob/c63acb7d628b161f438e877eca12d550647de34d/smartside/signal.py#L98-L109
251,802
xgvargas/smartside
smartside/signal.py
SmartSignal.print_all_signals
def print_all_signals(self): """ Prints out every signal available for this widget and childs. """ for o in dir(self): obj= getattr(self, o) #print o, type(obj) div = False for c in dir(obj): cobj = getattr(obj, c) ...
python
def print_all_signals(self): """ Prints out every signal available for this widget and childs. """ for o in dir(self): obj= getattr(self, o) #print o, type(obj) div = False for c in dir(obj): cobj = getattr(obj, c) ...
[ "def", "print_all_signals", "(", "self", ")", ":", "for", "o", "in", "dir", "(", "self", ")", ":", "obj", "=", "getattr", "(", "self", ",", "o", ")", "#print o, type(obj)", "div", "=", "False", "for", "c", "in", "dir", "(", "obj", ")", ":", "cobj",...
Prints out every signal available for this widget and childs.
[ "Prints", "out", "every", "signal", "available", "for", "this", "widget", "and", "childs", "." ]
c63acb7d628b161f438e877eca12d550647de34d
https://github.com/xgvargas/smartside/blob/c63acb7d628b161f438e877eca12d550647de34d/smartside/signal.py#L111-L125
251,803
misli/django-staticfiles-downloader
staticfiles_downloader/__init__.py
DownloaderFinder.find
def find(self, path, all=False): ''' Looks for files in the app directories. ''' found = os.path.join(settings.STATIC_ROOT, path) if all: return [found] else: return found
python
def find(self, path, all=False): ''' Looks for files in the app directories. ''' found = os.path.join(settings.STATIC_ROOT, path) if all: return [found] else: return found
[ "def", "find", "(", "self", ",", "path", ",", "all", "=", "False", ")", ":", "found", "=", "os", ".", "path", ".", "join", "(", "settings", ".", "STATIC_ROOT", ",", "path", ")", "if", "all", ":", "return", "[", "found", "]", "else", ":", "return"...
Looks for files in the app directories.
[ "Looks", "for", "files", "in", "the", "app", "directories", "." ]
f6440f6998d8e31fae986a25a03a8061d587af5a
https://github.com/misli/django-staticfiles-downloader/blob/f6440f6998d8e31fae986a25a03a8061d587af5a/staticfiles_downloader/__init__.py#L160-L168
251,804
daknuett/py_register_machine2
engine_tools/output/gpu_alike/rendering.py
Renderer.interrupt
def interrupt(self): """ Invoked on a write operation into the IR of the RendererDevice. """ if(self.device.read(9) & 0x01): self.handle_request() self.device.clear_IR()
python
def interrupt(self): """ Invoked on a write operation into the IR of the RendererDevice. """ if(self.device.read(9) & 0x01): self.handle_request() self.device.clear_IR()
[ "def", "interrupt", "(", "self", ")", ":", "if", "(", "self", ".", "device", ".", "read", "(", "9", ")", "&", "0x01", ")", ":", "self", ".", "handle_request", "(", ")", "self", ".", "device", ".", "clear_IR", "(", ")" ]
Invoked on a write operation into the IR of the RendererDevice.
[ "Invoked", "on", "a", "write", "operation", "into", "the", "IR", "of", "the", "RendererDevice", "." ]
599c53cd7576297d0d7a53344ed5d9aa98acc751
https://github.com/daknuett/py_register_machine2/blob/599c53cd7576297d0d7a53344ed5d9aa98acc751/engine_tools/output/gpu_alike/rendering.py#L65-L71
251,805
daknuett/py_register_machine2
engine_tools/output/gpu_alike/rendering.py
Renderer.draw_char_screen
def draw_char_screen(self): """ Draws the output buffered in the char_buffer. """ self.screen = Image.new("RGB", (self.height, self.width)) self.drawer = ImageDraw.Draw(self.screen) for sy, line in enumerate(self.char_buffer): for sx, tinfo in enumerate(line): self.drawer.text((sx * 6, sy * 9), tinf...
python
def draw_char_screen(self): """ Draws the output buffered in the char_buffer. """ self.screen = Image.new("RGB", (self.height, self.width)) self.drawer = ImageDraw.Draw(self.screen) for sy, line in enumerate(self.char_buffer): for sx, tinfo in enumerate(line): self.drawer.text((sx * 6, sy * 9), tinf...
[ "def", "draw_char_screen", "(", "self", ")", ":", "self", ".", "screen", "=", "Image", ".", "new", "(", "\"RGB\"", ",", "(", "self", ".", "height", ",", "self", ".", "width", ")", ")", "self", ".", "drawer", "=", "ImageDraw", ".", "Draw", "(", "sel...
Draws the output buffered in the char_buffer.
[ "Draws", "the", "output", "buffered", "in", "the", "char_buffer", "." ]
599c53cd7576297d0d7a53344ed5d9aa98acc751
https://github.com/daknuett/py_register_machine2/blob/599c53cd7576297d0d7a53344ed5d9aa98acc751/engine_tools/output/gpu_alike/rendering.py#L129-L139
251,806
anrosent/cli
cli.py
CLI.add_cli
def add_cli(self, prefix, other_cli): """Adds the functionality of the other CLI to this one, where all commands to the other CLI are prefixed by the given prefix plus a hyphen. e.g. To execute command `greet anson 5` on other cli given prefix cli2, you can execute the following with th...
python
def add_cli(self, prefix, other_cli): """Adds the functionality of the other CLI to this one, where all commands to the other CLI are prefixed by the given prefix plus a hyphen. e.g. To execute command `greet anson 5` on other cli given prefix cli2, you can execute the following with th...
[ "def", "add_cli", "(", "self", ",", "prefix", ",", "other_cli", ")", ":", "if", "prefix", "not", "in", "self", ".", "clis", "and", "prefix", "not", "in", "self", ".", "cmds", ":", "self", ".", "clis", "[", "prefix", "]", "=", "other_cli", "else", "...
Adds the functionality of the other CLI to this one, where all commands to the other CLI are prefixed by the given prefix plus a hyphen. e.g. To execute command `greet anson 5` on other cli given prefix cli2, you can execute the following with this CLI: cli2 greet anson 5
[ "Adds", "the", "functionality", "of", "the", "other", "CLI", "to", "this", "one", "where", "all", "commands", "to", "the", "other", "CLI", "are", "prefixed", "by", "the", "given", "prefix", "plus", "a", "hyphen", "." ]
8f89df4564c5124c95aaa288441f9d574dfa89a3
https://github.com/anrosent/cli/blob/8f89df4564c5124c95aaa288441f9d574dfa89a3/cli.py#L52-L64
251,807
anrosent/cli
cli.py
CLI._dispatch
def _dispatch(self, cmd, args): """Attempt to run the given command with the given arguments """ if cmd in self.clis: extern_cmd, args = args[0], args[1:] self.clis[cmd]._dispatch(extern_cmd, args) else: if cmd in self.cmds: callback, p...
python
def _dispatch(self, cmd, args): """Attempt to run the given command with the given arguments """ if cmd in self.clis: extern_cmd, args = args[0], args[1:] self.clis[cmd]._dispatch(extern_cmd, args) else: if cmd in self.cmds: callback, p...
[ "def", "_dispatch", "(", "self", ",", "cmd", ",", "args", ")", ":", "if", "cmd", "in", "self", ".", "clis", ":", "extern_cmd", ",", "args", "=", "args", "[", "0", "]", ",", "args", "[", "1", ":", "]", "self", ".", "clis", "[", "cmd", "]", "."...
Attempt to run the given command with the given arguments
[ "Attempt", "to", "run", "the", "given", "command", "with", "the", "given", "arguments" ]
8f89df4564c5124c95aaa288441f9d574dfa89a3
https://github.com/anrosent/cli/blob/8f89df4564c5124c95aaa288441f9d574dfa89a3/cli.py#L69-L84
251,808
anrosent/cli
cli.py
CLI.exec_cmd
def exec_cmd(self, cmdstr): """Parse line from CLI read loop and execute provided command """ parts = cmdstr.split() if len(parts): cmd, args = parts[0], parts[1:] self._dispatch(cmd, args) else: pass
python
def exec_cmd(self, cmdstr): """Parse line from CLI read loop and execute provided command """ parts = cmdstr.split() if len(parts): cmd, args = parts[0], parts[1:] self._dispatch(cmd, args) else: pass
[ "def", "exec_cmd", "(", "self", ",", "cmdstr", ")", ":", "parts", "=", "cmdstr", ".", "split", "(", ")", "if", "len", "(", "parts", ")", ":", "cmd", ",", "args", "=", "parts", "[", "0", "]", ",", "parts", "[", "1", ":", "]", "self", ".", "_di...
Parse line from CLI read loop and execute provided command
[ "Parse", "line", "from", "CLI", "read", "loop", "and", "execute", "provided", "command" ]
8f89df4564c5124c95aaa288441f9d574dfa89a3
https://github.com/anrosent/cli/blob/8f89df4564c5124c95aaa288441f9d574dfa89a3/cli.py#L86-L94
251,809
anrosent/cli
cli.py
CLI.print_help
def print_help(self): """Prints usage of all registered commands, collapsing aliases into one record """ seen_aliases = set() print('-'*80) for cmd in sorted(self.cmds): if cmd not in self.builtin_cmds: if cmd not in seen_aliases: ...
python
def print_help(self): """Prints usage of all registered commands, collapsing aliases into one record """ seen_aliases = set() print('-'*80) for cmd in sorted(self.cmds): if cmd not in self.builtin_cmds: if cmd not in seen_aliases: ...
[ "def", "print_help", "(", "self", ")", ":", "seen_aliases", "=", "set", "(", ")", "print", "(", "'-'", "*", "80", ")", "for", "cmd", "in", "sorted", "(", "self", ".", "cmds", ")", ":", "if", "cmd", "not", "in", "self", ".", "builtin_cmds", ":", "...
Prints usage of all registered commands, collapsing aliases into one record
[ "Prints", "usage", "of", "all", "registered", "commands", "collapsing", "aliases", "into", "one", "record" ]
8f89df4564c5124c95aaa288441f9d574dfa89a3
https://github.com/anrosent/cli/blob/8f89df4564c5124c95aaa288441f9d574dfa89a3/cli.py#L99-L116
251,810
anrosent/cli
cli.py
CLI.run
def run(self, instream=sys.stdin): """Runs the CLI, reading from sys.stdin by default """ sys.stdout.write(self.prompt) sys.stdout.flush() while True: line = instream.readline() try: self.exec_cmd(line) except Exception as e: ...
python
def run(self, instream=sys.stdin): """Runs the CLI, reading from sys.stdin by default """ sys.stdout.write(self.prompt) sys.stdout.flush() while True: line = instream.readline() try: self.exec_cmd(line) except Exception as e: ...
[ "def", "run", "(", "self", ",", "instream", "=", "sys", ".", "stdin", ")", ":", "sys", ".", "stdout", ".", "write", "(", "self", ".", "prompt", ")", "sys", ".", "stdout", ".", "flush", "(", ")", "while", "True", ":", "line", "=", "instream", ".",...
Runs the CLI, reading from sys.stdin by default
[ "Runs", "the", "CLI", "reading", "from", "sys", ".", "stdin", "by", "default" ]
8f89df4564c5124c95aaa288441f9d574dfa89a3
https://github.com/anrosent/cli/blob/8f89df4564c5124c95aaa288441f9d574dfa89a3/cli.py#L124-L137
251,811
jmvrbanac/PackMap
packmap/cli.py
PackMapClient.execute_finder
def execute_finder(self, manager, package_name): """ Execute finder script within the temporary venv context. """ filename = '{env_path}/results.json'.format(env_path=manager.env_path) subprocess.call([ manager.venv_python, self._finder_path, package_name, filename ]) ...
python
def execute_finder(self, manager, package_name): """ Execute finder script within the temporary venv context. """ filename = '{env_path}/results.json'.format(env_path=manager.env_path) subprocess.call([ manager.venv_python, self._finder_path, package_name, filename ]) ...
[ "def", "execute_finder", "(", "self", ",", "manager", ",", "package_name", ")", ":", "filename", "=", "'{env_path}/results.json'", ".", "format", "(", "env_path", "=", "manager", ".", "env_path", ")", "subprocess", ".", "call", "(", "[", "manager", ".", "ven...
Execute finder script within the temporary venv context.
[ "Execute", "finder", "script", "within", "the", "temporary", "venv", "context", "." ]
e35d12d21ab109cae1175e0dc94d7f4855256b23
https://github.com/jmvrbanac/PackMap/blob/e35d12d21ab109cae1175e0dc94d7f4855256b23/packmap/cli.py#L65-L74
251,812
corydodt/Crosscap
crosscap/urltool.py
urltool
def urltool(classqname, filt, reverse): """ Dump all urls branching from a class as OpenAPI 3 documentation The class must be given as a FQPN which points to a Klein() instance. Apply optional [FILT] as a regular expression searching within urls. For example, to match all urls beginning with api, ...
python
def urltool(classqname, filt, reverse): """ Dump all urls branching from a class as OpenAPI 3 documentation The class must be given as a FQPN which points to a Klein() instance. Apply optional [FILT] as a regular expression searching within urls. For example, to match all urls beginning with api, ...
[ "def", "urltool", "(", "classqname", ",", "filt", ",", "reverse", ")", ":", "filt", "=", "re", ".", "compile", "(", "filt", "or", "'.*'", ")", "rootCls", "=", "namedAny", "(", "classqname", ")", "rules", "=", "list", "(", "_iterClass", "(", "rootCls", ...
Dump all urls branching from a class as OpenAPI 3 documentation The class must be given as a FQPN which points to a Klein() instance. Apply optional [FILT] as a regular expression searching within urls. For example, to match all urls beginning with api, you might use '^/api'
[ "Dump", "all", "urls", "branching", "from", "a", "class", "as", "OpenAPI", "3", "documentation" ]
388a2ec36b8aa85e8f1ed692bb6e43474ba76c8e
https://github.com/corydodt/Crosscap/blob/388a2ec36b8aa85e8f1ed692bb6e43474ba76c8e/crosscap/urltool.py#L46-L75
251,813
corydodt/Crosscap
crosscap/urltool.py
literal_unicode_representer
def literal_unicode_representer(dumper, data): """ Use |- literal syntax for long strings """ if '\n' in data: return dumper.represent_scalar(u'tag:yaml.org,2002:str', data, style='|') else: return dumper.represent_scalar(u'tag:yaml.org,2002:str', data)
python
def literal_unicode_representer(dumper, data): """ Use |- literal syntax for long strings """ if '\n' in data: return dumper.represent_scalar(u'tag:yaml.org,2002:str', data, style='|') else: return dumper.represent_scalar(u'tag:yaml.org,2002:str', data)
[ "def", "literal_unicode_representer", "(", "dumper", ",", "data", ")", ":", "if", "'\\n'", "in", "data", ":", "return", "dumper", ".", "represent_scalar", "(", "u'tag:yaml.org,2002:str'", ",", "data", ",", "style", "=", "'|'", ")", "else", ":", "return", "du...
Use |- literal syntax for long strings
[ "Use", "|", "-", "literal", "syntax", "for", "long", "strings" ]
388a2ec36b8aa85e8f1ed692bb6e43474ba76c8e
https://github.com/corydodt/Crosscap/blob/388a2ec36b8aa85e8f1ed692bb6e43474ba76c8e/crosscap/urltool.py#L191-L198
251,814
ramrod-project/database-brain
schema/brain/queries/decorators.py
wrap_job_cursor
def wrap_job_cursor(func_, *args, **kwargs): """ wraps a filter generator. Types should be appropriate before passed to rethinkdb somewhat specific to the _jobs_cursor function :param func_: <callable function> :param args: <must have at least 3 arguments> :param kwargs: :return: retur...
python
def wrap_job_cursor(func_, *args, **kwargs): """ wraps a filter generator. Types should be appropriate before passed to rethinkdb somewhat specific to the _jobs_cursor function :param func_: <callable function> :param args: <must have at least 3 arguments> :param kwargs: :return: retur...
[ "def", "wrap_job_cursor", "(", "func_", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "assert", "isinstance", "(", "args", "[", "0", "]", ",", "str", ")", "assert", "isinstance", "(", "args", "[", "1", "]", ",", "(", "str", ",", "type", "(...
wraps a filter generator. Types should be appropriate before passed to rethinkdb somewhat specific to the _jobs_cursor function :param func_: <callable function> :param args: <must have at least 3 arguments> :param kwargs: :return: returned value from func_
[ "wraps", "a", "filter", "generator", ".", "Types", "should", "be", "appropriate", "before", "passed", "to", "rethinkdb" ]
b024cb44f34cabb9d80af38271ddb65c25767083
https://github.com/ramrod-project/database-brain/blob/b024cb44f34cabb9d80af38271ddb65c25767083/schema/brain/queries/decorators.py#L15-L32
251,815
obiwanus/django-qurl
qurl/__init__.py
qurl
def qurl(url, add=None, exclude=None, remove=None): """ Returns the url with changed parameters """ urlp = list(urlparse(url)) qp = parse_qsl(urlp[4]) # Add parameters add = add if add else {} for name, value in add.items(): if isinstance(value, (list, tuple)): # App...
python
def qurl(url, add=None, exclude=None, remove=None): """ Returns the url with changed parameters """ urlp = list(urlparse(url)) qp = parse_qsl(urlp[4]) # Add parameters add = add if add else {} for name, value in add.items(): if isinstance(value, (list, tuple)): # App...
[ "def", "qurl", "(", "url", ",", "add", "=", "None", ",", "exclude", "=", "None", ",", "remove", "=", "None", ")", ":", "urlp", "=", "list", "(", "urlparse", "(", "url", ")", ")", "qp", "=", "parse_qsl", "(", "urlp", "[", "4", "]", ")", "# Add p...
Returns the url with changed parameters
[ "Returns", "the", "url", "with", "changed", "parameters" ]
745992fc4241fd7a2f034c202f6fe05da7437683
https://github.com/obiwanus/django-qurl/blob/745992fc4241fd7a2f034c202f6fe05da7437683/qurl/__init__.py#L11-L45
251,816
pjuren/pyokit
src/pyokit/datastruct/read.py
clip_adaptor
def clip_adaptor(read, adaptor): """ Clip an adaptor sequence from this sequence. We assume it's in the 3' end. This is basically a convenience wrapper for clipThreePrime. It requires 8 out of 10 of the first bases in the adaptor sequence to match for clipping to occur. :param adaptor: sequence to look for...
python
def clip_adaptor(read, adaptor): """ Clip an adaptor sequence from this sequence. We assume it's in the 3' end. This is basically a convenience wrapper for clipThreePrime. It requires 8 out of 10 of the first bases in the adaptor sequence to match for clipping to occur. :param adaptor: sequence to look for...
[ "def", "clip_adaptor", "(", "read", ",", "adaptor", ")", ":", "missmatches", "=", "2", "adaptor", "=", "adaptor", ".", "truncate", "(", "10", ")", "read", ".", "clip_end", "(", "adaptor", ",", "len", "(", "adaptor", ")", "-", "missmatches", ")" ]
Clip an adaptor sequence from this sequence. We assume it's in the 3' end. This is basically a convenience wrapper for clipThreePrime. It requires 8 out of 10 of the first bases in the adaptor sequence to match for clipping to occur. :param adaptor: sequence to look for. We only use the first 10 bases; ...
[ "Clip", "an", "adaptor", "sequence", "from", "this", "sequence", ".", "We", "assume", "it", "s", "in", "the", "3", "end", ".", "This", "is", "basically", "a", "convenience", "wrapper", "for", "clipThreePrime", ".", "It", "requires", "8", "out", "of", "10...
fddae123b5d817daa39496183f19c000d9c3791f
https://github.com/pjuren/pyokit/blob/fddae123b5d817daa39496183f19c000d9c3791f/src/pyokit/datastruct/read.py#L276-L288
251,817
pjuren/pyokit
src/pyokit/datastruct/read.py
contains_adaptor
def contains_adaptor(read, adaptor): """ Check whether this sequence contains adaptor contamination. If it exists, we assume it's in the 3' end. This function requires 8 out of 10 of the first bases in the adaptor sequence to match for an occurrence to be reported. :param adaptor: sequence to look for. We ...
python
def contains_adaptor(read, adaptor): """ Check whether this sequence contains adaptor contamination. If it exists, we assume it's in the 3' end. This function requires 8 out of 10 of the first bases in the adaptor sequence to match for an occurrence to be reported. :param adaptor: sequence to look for. We ...
[ "def", "contains_adaptor", "(", "read", ",", "adaptor", ")", ":", "origSeq", "=", "read", ".", "sequenceData", "clip_adaptor", "(", "read", ",", "adaptor", ")", "res", "=", "False", "if", "read", ".", "sequenceData", "!=", "origSeq", ":", "res", "=", "Tr...
Check whether this sequence contains adaptor contamination. If it exists, we assume it's in the 3' end. This function requires 8 out of 10 of the first bases in the adaptor sequence to match for an occurrence to be reported. :param adaptor: sequence to look for. We only use first 10 bases; must be ...
[ "Check", "whether", "this", "sequence", "contains", "adaptor", "contamination", ".", "If", "it", "exists", "we", "assume", "it", "s", "in", "the", "3", "end", ".", "This", "function", "requires", "8", "out", "of", "10", "of", "the", "first", "bases", "in...
fddae123b5d817daa39496183f19c000d9c3791f
https://github.com/pjuren/pyokit/blob/fddae123b5d817daa39496183f19c000d9c3791f/src/pyokit/datastruct/read.py#L291-L308
251,818
pjuren/pyokit
src/pyokit/datastruct/read.py
NGSRead.reverse_complement
def reverse_complement(self, is_RNA=None): """ Reverse complement this read in-place. """ Sequence.reverseComplement(self, is_RNA) self.seq_qual = self.seq_qual[::-1]
python
def reverse_complement(self, is_RNA=None): """ Reverse complement this read in-place. """ Sequence.reverseComplement(self, is_RNA) self.seq_qual = self.seq_qual[::-1]
[ "def", "reverse_complement", "(", "self", ",", "is_RNA", "=", "None", ")", ":", "Sequence", ".", "reverseComplement", "(", "self", ",", "is_RNA", ")", "self", ".", "seq_qual", "=", "self", ".", "seq_qual", "[", ":", ":", "-", "1", "]" ]
Reverse complement this read in-place.
[ "Reverse", "complement", "this", "read", "in", "-", "place", "." ]
fddae123b5d817daa39496183f19c000d9c3791f
https://github.com/pjuren/pyokit/blob/fddae123b5d817daa39496183f19c000d9c3791f/src/pyokit/datastruct/read.py#L192-L197
251,819
pjuren/pyokit
src/pyokit/datastruct/read.py
NGSRead.split
def split(self, point=None): """ Split this read into two halves. Original sequence is left unaltered. The name of the resultant reads will have '.1' and '.2' appended to the name from the original read. :param point: the point (index, starting from 0) at which to split this read...
python
def split(self, point=None): """ Split this read into two halves. Original sequence is left unaltered. The name of the resultant reads will have '.1' and '.2' appended to the name from the original read. :param point: the point (index, starting from 0) at which to split this read...
[ "def", "split", "(", "self", ",", "point", "=", "None", ")", ":", "if", "point", "is", "None", ":", "point", "=", "len", "(", "self", ")", "/", "2", "if", "point", "<", "0", ":", "raise", "NGSReadError", "(", "\"Cannot split read at index less than 0 \""...
Split this read into two halves. Original sequence is left unaltered. The name of the resultant reads will have '.1' and '.2' appended to the name from the original read. :param point: the point (index, starting from 0) at which to split this read -- everything before this index will be ...
[ "Split", "this", "read", "into", "two", "halves", ".", "Original", "sequence", "is", "left", "unaltered", "." ]
fddae123b5d817daa39496183f19c000d9c3791f
https://github.com/pjuren/pyokit/blob/fddae123b5d817daa39496183f19c000d9c3791f/src/pyokit/datastruct/read.py#L199-L230