utils/genome_validation.py
def validate_sequence_file(seq_file, seq_type='dna'):
    """
    Validating sequence file file using esl-seqstat

    seq_file: The sequence file to validate
    seq_type: The type of the sequences in the file (e.g. dna, rna, amino)

    return: True if valid, False if invalid
    """

    # command string should look like esl-seqstat --seq_type seq_file
    cmd_args = []
    esl_tool = os.path.join(gc.LSF_RFAM_BIN, 'esl-seqstat')
    seq_type_arg = "--%s" % seq_type

    cmd_args = [esl_tool, seq_type_arg, seq_file]
    popen_obj = subprocess.Popen(cmd_args, stderr=subprocess.STDOUT, stdout=subprocess.PIPE)

    message = popen_obj.communicate()

    if message[0].find("failed") == -1:
        return True

    return False

    Validating sequence file file using esl-seqstat

    seq_file: The sequence file to validate
    seq_type: The type of the sequences in the file (e.g. dna, rna, amino)

    return: True if valid, False if invalid
    
Validating sequence file file using esl-seqstat
seq_file: The sequence file to validate
seq_type: The type of the sequences in the file

True if valid, False if invalid
Validating sequence file file using esl - seqstat seq_file : The sequence file to validate seq_type : The type of the sequences in the file True if valid False if invalid
def validate_sequence_file(seq_file, seq_type='dna'):
    cmd_args = []
    esl_tool = os.path.join(gc.LSF_RFAM_BIN, 'esl-seqstat')
    seq_type_arg = "--%s" % seq_type
    cmd_args = [esl_tool, seq_type_arg, seq_file]
    popen_obj = subprocess.Popen(cmd_args, stderr=subprocess.STDOUT, stdout=subprocess.PIPE)
    message = popen_obj.communicate()
    if message[0].find("failed") == -1:
        return True
    return False
def validate_sequence_file ( seq_file , seq_type = 'dna' ) : cmd_args = [ ] esl_tool = os . path . join ( gc . LSF_RFAM_BIN , 'esl-seqstat' ) seq_type_arg = "--%s" % seq_type cmd_args = [ esl_tool , seq_type_arg , seq_file ] popen_obj = subprocess . Popen ( cmd_args , stderr = subprocess . STDOUT , stdout = subprocess . PIPE ) message = popen_obj . communicate ( ) if message [ 0 ] . find ( "failed" ) == - 1 : return True return False
Validating sequence file file using esl-seqstat
seq_file: The sequence file to validate
seq_type: The type of the sequences in the file (e.g.
Validating sequence file file using esl - seqstat seq_file : The sequence file to validate seq_type : The type of the sequences in the file ( e . g .
"""
    Validating sequence file file using esl-seqstat

    seq_file: The sequence file to validate
    seq_type: The type of the sequences in the file (e.g. dna, rna, amino)

    return: True if valid, False if invalid
    """ # command string should look like esl-seqstat --seq_type seq_file
seq_file
seq_type