scripts/preprocessing/relabel_seed.py
def align_sequences_to_cm(cmfile, fasta_file, dest_dir=None):
    """
    Aligns a fasta to a covariance model using cmalign

    cmfile: A valid covariance model
    fasta_file: A valid nucleotide fasta file

    dest_dir: Destination directory where to generate any output

    return: Returns path to the aligned sequences, otherwise
    returns None if file does not exist
    """

    if dest_dir is None:
        dest_dir = os.path.split(fasta_file)[0]

    out_filename = os.path.basename(fasta_file).partition('.')[0]
    out_filename += "_aln.stk"

    new_seed = os.path.join(dest_dir, out_filename)

    cmd = "cmalign %s %s | grep -Ev '^(#=GR)' > %s" % (cmfile, fasta_file, new_seed)
    subprocess.call(cmd, shell=True)

    if os.path.exists(new_seed):
        return new_seed

    return None

    Aligns a fasta to a covariance model using cmalign

    cmfile: A valid covariance model
    fasta_file: A valid nucleotide fasta file

    dest_dir: Destination directory where to generate any output

    return: Returns path to the aligned sequences, otherwise
    returns None if file does not exist
    
Aligns a fasta to a covariance model using cmalign
cmfile: A valid covariance model
fasta_file: A valid nucleotide fasta file

Destination directory where to generate any output

Returns path to the aligned sequences, otherwise
returns None if file does not exist
Aligns a fasta to a covariance model using cmalign cmfile : A valid covariance model fasta_file : A valid nucleotide fasta file Destination directory where to generate any output Returns path to the aligned sequences otherwise returns None if file does not exist
def align_sequences_to_cm(cmfile, fasta_file, dest_dir=None):
    if dest_dir is None:
        dest_dir = os.path.split(fasta_file)[0]
    out_filename = os.path.basename(fasta_file).partition('.')[0]
    out_filename += "_aln.stk"
    new_seed = os.path.join(dest_dir, out_filename)
    cmd = "cmalign %s %s | grep -Ev '^(#=GR)' > %s" % (cmfile, fasta_file, new_seed)
    subprocess.call(cmd, shell=True)
    if os.path.exists(new_seed):
        return new_seed
    return None
def align_sequences_to_cm ( cmfile , fasta_file , dest_dir = None ) : if dest_dir is None : dest_dir = os . path . split ( fasta_file ) [ 0 ] out_filename = os . path . basename ( fasta_file ) . partition ( '.' ) [ 0 ] out_filename += "_aln.stk" new_seed = os . path . join ( dest_dir , out_filename ) cmd = "cmalign %s %s | grep -Ev '^(#=GR)' > %s" % ( cmfile , fasta_file , new_seed ) subprocess . call ( cmd , shell = True ) if os . path . exists ( new_seed ) : return new_seed return None
Aligns a fasta to a covariance model using cmalign
cmfile: A valid covariance model
fasta_file: A valid nucleotide fasta file
Aligns a fasta to a covariance model using cmalign cmfile : A valid covariance model fasta_file : A valid nucleotide fasta file
"""
    Aligns a fasta to a covariance model using cmalign

    cmfile: A valid covariance model
    fasta_file: A valid nucleotide fasta file

    dest_dir: Destination directory where to generate any output

    return: Returns path to the aligned sequences, otherwise
    returns None if file does not exist
    """
cmfile
fasta_file
dest_dir