def parseBEDString(line, scoreType=int, dropAfter=None):
peices = line.split("<STR_LIT:\t>")<EOL>if dropAfter is not None:<EOL><INDENT>peices = peices[<NUM_LIT:0>:dropAfter]<EOL><DEDENT>if len(peices) < <NUM_LIT:3>:<EOL><INDENT>raise GenomicIntervalError("<STR_LIT>" +<EOL>"<STR_LIT>" +<EOL>str(len(peices)) + "<STR_LIT>" + line)<EOL><DEDENT>chrom = peices[<NUM_LIT:0>]<EOL>start = peices[<NUM_LIT:1>]<EOL>end = peices[<NUM_LIT:2>]<EOL>name = None<EOL>score = None<EOL>strand = None<EOL>if len(peices) >= <NUM_LIT:4> is not None:<EOL><INDENT>name = peices[<NUM_LIT:3>]<EOL><DEDENT>if len(peices) >= <NUM_LIT:5> is not None:<EOL><INDENT>score = peices[<NUM_LIT:4>]<EOL><DEDENT>if len(peices) >= <NUM_LIT:6> is not None:<EOL><INDENT>strand = peices[<NUM_LIT:5>]<EOL><DEDENT>return GenomicInterval(chrom, start, end, name, score, strand, scoreType)<EOL>
Parse a string in BED format and return a GenomicInterval object.

:param line: the string to be parsed
:param dropAfter: an int indicating that any fields after and including
                  this field should be ignored as they don't conform to
                  the BED format. By default, None, meaning we use all
                  fields. Index from zero.
:return: GenomicInterval object built from the BED string representation