scripts/support/populate_seed_region_md5.py
def fetch_sequence(seq_file, seq_acc, seq_start, seq_end):
    """
    Extracts a sequence from sequence file seq_file using rfamseq_acc
    and sequence start-end positions (seq_start, seq_end)
    seq_file: A sequence file in fasta format to extract a sequence from
    seq_acc: The accession of the sequence to extract
    seq_start: The starting position of the sequence/subsequence
    seq_end: The end position of the sequence/subsequence

    return: A string which corresponds to the extracted sequence
    """
    cmd = "%s %s %s/%s-%s" % (ESL_PATH,
                                 seq_file, str(seq_acc),
                              str(seq_start), str(seq_end))

    proc = subprocess.Popen(
        cmd, shell=True, stdout=subprocess.PIPE)

    seq = proc.communicate()[0]

    # get sequence
    sequence = ''
    seq_bits = seq.split('\n')[1:]
    sequence = sequence.join(seq_bits)

    return sequence

    Extracts a sequence from sequence file seq_file using rfamseq_acc
    and sequence start-end positions (seq_start, seq_end)
    seq_file: A sequence file in fasta format to extract a sequence from
    seq_acc: The accession of the sequence to extract
    seq_start: The starting position of the sequence/subsequence
    seq_end: The end position of the sequence/subsequence

    return: A string which corresponds to the extracted sequence
    
Extracts a sequence from sequence file seq_file using rfamseq_acc
and sequence start-end positions (seq_start, seq_end)
seq_file: A sequence file in fasta format to extract a sequence from
seq_acc: The accession of the sequence to extract
seq_start: The starting position of the sequence/subsequence
seq_end: The end position of the sequence/subsequence

A string which corresponds to the extracted sequence
Extracts a sequence from sequence file seq_file using rfamseq_acc and sequence start - end positions ( seq_start seq_end ) seq_file : A sequence file in fasta format to extract a sequence from seq_acc : The accession of the sequence to extract seq_start : The starting position of the sequence / subsequence seq_end : The end position of the sequence / subsequence A string which corresponds to the extracted sequence
def fetch_sequence(seq_file, seq_acc, seq_start, seq_end):
    cmd = "%s %s %s/%s-%s" % (ESL_PATH,
                                 seq_file, str(seq_acc),
                              str(seq_start), str(seq_end))
    proc = subprocess.Popen(
        cmd, shell=True, stdout=subprocess.PIPE)
    seq = proc.communicate()[0]
    sequence = ''
    seq_bits = seq.split('\n')[1:]
    sequence = sequence.join(seq_bits)
    return sequence
def fetch_sequence ( seq_file , seq_acc , seq_start , seq_end ) : cmd = "%s %s %s/%s-%s" % ( ESL_PATH , seq_file , str ( seq_acc ) , str ( seq_start ) , str ( seq_end ) ) proc = subprocess . Popen ( cmd , shell = True , stdout = subprocess . PIPE ) seq = proc . communicate ( ) [ 0 ] sequence = '' seq_bits = seq . split ( '\n' ) [ 1 : ] sequence = sequence . join ( seq_bits ) return sequence
Extracts a sequence from sequence file seq_file using rfamseq_acc
and sequence start-end positions (seq_start, seq_end)
seq_file: A sequence file in fasta format to extract a sequence from
seq_acc: The accession of the sequence to extract
seq_start: The starting position of the sequence/subsequence
seq_end: The end position of the sequence/subsequence
Extracts a sequence from sequence file seq_file using rfamseq_acc and sequence start - end positions ( seq_start seq_end ) seq_file : A sequence file in fasta format to extract a sequence from seq_acc : The accession of the sequence to extract seq_start : The starting position of the sequence / subsequence seq_end : The end position of the sequence / subsequence
"""
    Extracts a sequence from sequence file seq_file using rfamseq_acc
    and sequence start-end positions (seq_start, seq_end)
    seq_file: A sequence file in fasta format to extract a sequence from
    seq_acc: The accession of the sequence to extract
    seq_start: The starting position of the sequence/subsequence
    seq_end: The end position of the sequence/subsequence

    return: A string which corresponds to the extracted sequence
    """ # get sequence
seq_file
seq_acc
seq_start
seq_end