Beispiel #1
0
            "threshold": params.viruses_per_month,
            "category": lambda x:(x.attributes['date'].year, x.attributes['date'].month, x.attributes['country'])
        },
        "colors": ["authors", "country", "region"],
        "color_defs": ["./colors.tsv"],
        "lat_longs": ["country", "region"],
        "auspice_filters": ["authors", "region", "country"],
        "reference": {
            "path": "measles-reference.gb",
            "metadata": {
                'strain': "Ichinose-B95a", "accession": "NC_001498.1", "date": "XXXX-XX-XX",
                'host': "human", 'country': "Unknown", 'region': "Unknown"
            },
            "include": 0,
            "genes": ['N', 'P', 'V', 'C', 'M', 'F', 'H', 'L']
        }
    }

    return config

if __name__=="__main__":
    params = collect_args()
    runner = prepare(make_config(params))
    runner.load_references()
    runner.applyFilters()
    runner.ensure_all_segments()
    runner.subsample()
    runner.colors()
    runner.latlongs()
    runner.write_to_json()
Beispiel #2
0
    }
    return config


if __name__=="__main__":
    parser = collect_args()
    params = parser.parse_args()

    if 'multiple' in params.serotypes:
        params.serotypes = ['denv1', 'denv2', 'denv3', 'denv4', 'all']
    # else:
    #     params.serotypes = params.serotypes]
    # modify config file according to serotype
    for serotype in params.serotypes:
        print("Preparing serotype %s"%serotype)

        config = make_config(serotype, params)

        if params.viruses_per_month == 0:
            config["subsample"] = False
        else:
            config["subsample"]["threshold"] = params.viruses_per_month

        runner = prepare(config)
        runner.load_references()
        runner.applyFilters()
        runner.subsample()
        runner.colors()
        runner.latlongs()
        runner.write_to_json()
        "sources": sources
    }
    return config


if __name__=="__main__":
    parser = collect_args()
    params = parser.parse_args()

    if 'multiple' in params.serotypes:
        params.serotypes = ['denv1', 'denv2', 'denv3', 'denv4', 'all']

    # modify config file according to serotype
    for serotype in params.serotypes:
        print("Preparing serotype %s"%serotype)

        config = make_config(serotype, params)

        if params.viruses_per_month == 0:
            config["subsample"] = False
        else:
            config["subsample"]["threshold"] = params.viruses_per_month

        runner = prepare(config)
        runner.load_references()
        runner.applyFilters()
        runner.subsample()
        runner.colors()
        runner.latlongs()
        runner.write_to_json()