def all_combinations_of_ensembl_genomes(args):
    """
    Use all combinations of species and release versions specified by the
    commandline arguments to return a list of EnsemblRelease or Genome objects.
    The results will typically be of type EnsemblRelease unless the
    --custom-mirror argument was given.
    """
    species_list = args.species if args.species else ["human"]
    release_list = args.release if args.release else [MAX_ENSEMBL_RELEASE]
    genomes = []
    for species in species_list:
        # Otherwise, use Ensembl release information
        for version in release_list:
            ensembl_release = EnsemblRelease(version, species=species)

            if not args.custom_mirror:
                genomes.append(ensembl_release)
            else:
                # if we're using a custom mirror then we expect the provided
                # URL to be a directory with all the same filenames as
                # would be provided by Ensembl
                gtf_url = os.path.join(
                    args.custom_mirror,
                    os.path.basename(ensembl_release.gtf_url))
                transcript_fasta_urls = [
                    os.path.join(
                        args.custom_mirror,
                        os.path.basename(transcript_fasta_url))
                    for transcript_fasta_url in ensembl_release.transcript_fasta_urls
                ]
                protein_fasta_urls = [
                    os.path.join(
                        args.custom_mirror,
                        os.path.basename(protein_fasta_url))
                    for protein_fasta_url in
                    ensembl_release.protein_fasta_urls
                ]
                reference_name = ensembl_release.reference_name
                genome = Genome(
                    reference_name=reference_name,
                    annotation_name="ensembl",
                    annotation_version=version,
                    gtf_path_or_url=gtf_url,
                    transcript_fasta_paths_or_urls=transcript_fasta_urls,
                    protein_fasta_paths_or_urls=protein_fasta_urls)
                genomes.append(genome)
    return genomes
def all_combinations_of_ensembl_genomes ( args ) : species_list = args . species if args . species else [ "human" ] release_list = args . release if args . release else [ MAX_ENSEMBL_RELEASE ] genomes = [ ] for species in species_list : for version in release_list : ensembl_release = EnsemblRelease ( version , species = species ) if not args . custom_mirror : genomes . append ( ensembl_release ) else : gtf_url = os . path . join ( args . custom_mirror , os . path . basename ( ensembl_release . gtf_url ) ) transcript_fasta_urls = [ os . path . join ( args . custom_mirror , os . path . basename ( transcript_fasta_url ) ) for transcript_fasta_url in ensembl_release . transcript_fasta_urls ] protein_fasta_urls = [ os . path . join ( args . custom_mirror , os . path . basename ( protein_fasta_url ) ) for protein_fasta_url in ensembl_release . protein_fasta_urls ] reference_name = ensembl_release . reference_name genome = Genome ( reference_name = reference_name , annotation_name = "ensembl" , annotation_version = version , gtf_path_or_url = gtf_url , transcript_fasta_paths_or_urls = transcript_fasta_urls , protein_fasta_paths_or_urls = protein_fasta_urls ) genomes . append ( genome ) return genomes
Use all combinations of species and release versions specified by the
    commandline arguments to return a list of EnsemblRelease or Genome objects.
    The results will typically be of type EnsemblRelease unless the
    --custom-mirror argument was given.