def _get_training_data(vrn_files):
    """Retrieve training data, returning an empty set of information if not available.
    """
    out = {"SNP": [], "INDEL": []}
    # SNPs
    for name, train_info in [("train_hapmap", "known=false,training=true,truth=true,prior=15.0"),
                             ("train_omni", "known=false,training=true,truth=true,prior=12.0"),
                             ("train_1000g", "known=false,training=true,truth=false,prior=10.0"),
                             ("dbsnp", "known=true,training=false,truth=false,prior=2.0")]:
        if name not in vrn_files:
            return {}
        else:
            out["SNP"].append((name.replace("train_", ""), train_info, vrn_files[name]))
    # Indels
    if "train_indels" in vrn_files:
        out["INDEL"].append(("mills", "known=true,training=true,truth=true,prior=12.0",
                             vrn_files["train_indels"]))
    else:
        return {}
    return out
def _get_training_data ( vrn_files ) : out = { "SNP" : [ ] , "INDEL" : [ ] } for name , train_info in [ ( "train_hapmap" , "known=false,training=true,truth=true,prior=15.0" ) , ( "train_omni" , "known=false,training=true,truth=true,prior=12.0" ) , ( "train_1000g" , "known=false,training=true,truth=false,prior=10.0" ) , ( "dbsnp" , "known=true,training=false,truth=false,prior=2.0" ) ] : if name not in vrn_files : return { } else : out [ "SNP" ] . append ( ( name . replace ( "train_" , "" ) , train_info , vrn_files [ name ] ) ) if "train_indels" in vrn_files : out [ "INDEL" ] . append ( ( "mills" , "known=true,training=true,truth=true,prior=12.0" , vrn_files [ "train_indels" ] ) ) else : return { } return out
Retrieve training data, returning an empty set of information if not available.