scripts/preprocessing/relabel_seed.py
def generate_seed_id_from_RNAcentral(sequence):
    """
    Generates a seed accession based on a sequence mad5 match in RNAcentral

    sequence: A valid DNA/RNA sequence

    return: Returns RNAcentral id, otherwise returns None
    """

    sequence_md5 = sequence_to_md5(sequence)

    rnacentral_url = 'https://rnacentral.org/api/v1/rna'
    response = requests.get(rnacentral_url, params={'md5': sequence_md5})

    data = response.json()

    if data['count'] > 0:
        return data['results'][0]['rnacentral_id'] + "/1-" + str(data['results'][0]['length'])

    return None

    Generates a seed accession based on a sequence mad5 match in RNAcentral

    sequence: A valid DNA/RNA sequence

    return: Returns RNAcentral id, otherwise returns None
    
Generates a seed accession based on a sequence mad5 match in RNAcentral
sequence: A valid DNA/RNA sequence

Returns RNAcentral id, otherwise returns None
Generates a seed accession based on a sequence mad5 match in RNAcentral sequence : A valid DNA / RNA sequence Returns RNAcentral id otherwise returns None
def generate_seed_id_from_RNAcentral(sequence):
    sequence_md5 = sequence_to_md5(sequence)
    rnacentral_url = 'https://rnacentral.org/api/v1/rna'
    response = requests.get(rnacentral_url, params={'md5': sequence_md5})
    data = response.json()
    if data['count'] > 0:
        return data['results'][0]['rnacentral_id'] + "/1-" + str(data['results'][0]['length'])
    return None
def generate_seed_id_from_RNAcentral ( sequence ) : sequence_md5 = sequence_to_md5 ( sequence ) rnacentral_url = 'https://rnacentral.org/api/v1/rna' response = requests . get ( rnacentral_url , params = { 'md5' : sequence_md5 } ) data = response . json ( ) if data [ 'count' ] > 0 : return data [ 'results' ] [ 0 ] [ 'rnacentral_id' ] + "/1-" + str ( data [ 'results' ] [ 0 ] [ 'length' ] ) return None
Generates a seed accession based on a sequence mad5 match in RNAcentral
sequence: A valid DNA/RNA sequence
Generates a seed accession based on a sequence mad5 match in RNAcentral sequence : A valid DNA / RNA sequence
"""
    Generates a seed accession based on a sequence mad5 match in RNAcentral

    sequence: A valid DNA/RNA sequence

    return: Returns RNAcentral id, otherwise returns None
    """
sequence