scripts/processing/threshold_selector.py
def generate_family_ss_with_rscape(family_dir, file_type='SEED'):
    """

    family_dir:
    file_type: The type of the alignment SEED/FULL

    return:
    """

    alignment_path = os.path.join(family_dir, file_type)
    
    if file_type == "FULL":
        alignment_path = os.path.join(family_dir, "align")

    outdir = os.path.join(family_dir, "rscape-" + file_type.lower())

    # create outdir if it does not exist
    if not os.path.exists(outdir):
        os.mkdir(outdir)

    cmd = "R-scape --outdir %s -s --fold %s" % (outdir, alignment_path)

    process = Popen(["R-scape", "--outdir", outdir,
                     "-s", "--fold", alignment_path], stdout=PIPE)

    rscape_out = process.communicate()[0].decode('Utf-8').split('\n')

    covarying_bp = rscape_out[-3].split(' ')[-1]
    
    return int(covarying_bp)


    family_dir:
    file_type: The type of the alignment SEED/FULL

    return:
    
The type of the alignment SEED/FULL


The type of the alignment SEED / FULL
def generate_family_ss_with_rscape(family_dir, file_type='SEED'):
    alignment_path = os.path.join(family_dir, file_type)
    if file_type == "FULL":
        alignment_path = os.path.join(family_dir, "align")
    outdir = os.path.join(family_dir, "rscape-" + file_type.lower())
    if not os.path.exists(outdir):
        os.mkdir(outdir)
    cmd = "R-scape --outdir %s -s --fold %s" % (outdir, alignment_path)
    process = Popen(["R-scape", "--outdir", outdir,
                     "-s", "--fold", alignment_path], stdout=PIPE)
    rscape_out = process.communicate()[0].decode('Utf-8').split('\n')
    covarying_bp = rscape_out[-3].split(' ')[-1]
    return int(covarying_bp)
def generate_family_ss_with_rscape ( family_dir , file_type = 'SEED' ) : alignment_path = os . path . join ( family_dir , file_type ) if file_type == "FULL" : alignment_path = os . path . join ( family_dir , "align" ) outdir = os . path . join ( family_dir , "rscape-" + file_type . lower ( ) ) if not os . path . exists ( outdir ) : os . mkdir ( outdir ) cmd = "R-scape --outdir %s -s --fold %s" % ( outdir , alignment_path ) process = Popen ( [ "R-scape" , "--outdir" , outdir , "-s" , "--fold" , alignment_path ] , stdout = PIPE ) rscape_out = process . communicate ( ) [ 0 ] . decode ( 'Utf-8' ) . split ( '\n' ) covarying_bp = rscape_out [ - 3 ] . split ( ' ' ) [ - 1 ] return int ( covarying_bp )
family_dir:
file_type: The type of the alignment SEED/FULL
family_dir : file_type : The type of the alignment SEED / FULL
"""

    family_dir:
    file_type: The type of the alignment SEED/FULL

    return:
    """ # create outdir if it does not exist
family_dir
file_type