:py:mod:`deeprvat.annotations.annotations` ========================================== .. py:module:: deeprvat.annotations.annotations .. autodoc2-docstring:: deeprvat.annotations.annotations :allowtitles: Module Contents --------------- Functions ~~~~~~~~~ .. list-table:: :class: autosummary longtable :align: left * - :py:obj:`precision ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.precision :summary: * - :py:obj:`recall ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.recall :summary: * - :py:obj:`deepripe_get_model_info ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.deepripe_get_model_info :summary: * - :py:obj:`seq_to_1hot ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.seq_to_1hot :summary: * - :py:obj:`convert2bed ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.convert2bed :summary: * - :py:obj:`deepripe_encode_variant_bedline ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.deepripe_encode_variant_bedline :summary: * - :py:obj:`readYamlColumns ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.readYamlColumns :summary: * - :py:obj:`get_parquet_columns ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.get_parquet_columns :summary: * - :py:obj:`cli ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.cli :summary: * - :py:obj:`filter_annotations_by_exon_distance ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.filter_annotations_by_exon_distance :summary: * - :py:obj:`deepsea_pca ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.deepsea_pca :summary: * - :py:obj:`scorevariants_deepripe ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.scorevariants_deepripe :summary: * - :py:obj:`process_chunk ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.process_chunk :summary: * - :py:obj:`aggregate_abscores ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.aggregate_abscores :summary: * - :py:obj:`deepripe_score_variant_onlyseq_all ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.deepripe_score_variant_onlyseq_all :summary: * - :py:obj:`calculate_scores_max ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.calculate_scores_max :summary: * - :py:obj:`merge_abscores ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.merge_abscores :summary: * - :py:obj:`merge_deepripe ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.merge_deepripe :summary: * - :py:obj:`merge_deepsea_pcas ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.merge_deepsea_pcas :summary: * - :py:obj:`process_chunk_addids ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.process_chunk_addids :summary: * - :py:obj:`add_ids ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.add_ids :summary: * - :py:obj:`add_ids_dask ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.add_ids_dask :summary: * - :py:obj:`chunks ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.chunks :summary: * - :py:obj:`read_deepripe_file ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.read_deepripe_file :summary: * - :py:obj:`concatenate_deepsea ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.concatenate_deepsea :summary: * - :py:obj:`merge_annotations ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.merge_annotations :summary: * - :py:obj:`process_deepripe ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.process_deepripe :summary: * - :py:obj:`process_vep ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.process_vep :summary: * - :py:obj:`compute_plof ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.compute_plof :summary: * - :py:obj:`concat_annotations ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.concat_annotations :summary: * - :py:obj:`get_af_from_gt ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.get_af_from_gt :summary: * - :py:obj:`merge_af ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.merge_af :summary: * - :py:obj:`calculate_maf ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.calculate_maf :summary: * - :py:obj:`add_gene_ids ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.add_gene_ids :summary: * - :py:obj:`create_gene_id_file ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.create_gene_id_file :summary: * - :py:obj:`select_rename_fill_annotations ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.select_rename_fill_annotations :summary: * - :py:obj:`aggregate_and_concat_absplice ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.aggregate_and_concat_absplice :summary: * - :py:obj:`merge_absplice_scores ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.merge_absplice_scores :summary: Data ~~~~ .. list-table:: :class: autosummary longtable :align: left * - :py:obj:`logger ` - .. autodoc2-docstring:: deeprvat.annotations.annotations.logger :summary: API ~~~ .. py:function:: precision(y_true, y_pred) :canonical: deeprvat.annotations.annotations.precision .. autodoc2-docstring:: deeprvat.annotations.annotations.precision .. py:function:: recall(y_true, y_pred) :canonical: deeprvat.annotations.annotations.recall .. autodoc2-docstring:: deeprvat.annotations.annotations.recall .. py:function:: deepripe_get_model_info(saved_models_dict, saved_deepripe_models_path) :canonical: deeprvat.annotations.annotations.deepripe_get_model_info .. autodoc2-docstring:: deeprvat.annotations.annotations.deepripe_get_model_info .. py:function:: seq_to_1hot(seq, randomsel=True) :canonical: deeprvat.annotations.annotations.seq_to_1hot .. autodoc2-docstring:: deeprvat.annotations.annotations.seq_to_1hot .. py:function:: convert2bed(variants_file, output_dir) :canonical: deeprvat.annotations.annotations.convert2bed .. autodoc2-docstring:: deeprvat.annotations.annotations.convert2bed .. py:function:: deepripe_encode_variant_bedline(bedline, genomefasta, flank_size=75) :canonical: deeprvat.annotations.annotations.deepripe_encode_variant_bedline .. autodoc2-docstring:: deeprvat.annotations.annotations.deepripe_encode_variant_bedline .. py:function:: readYamlColumns(annotation_columns_yaml_file) :canonical: deeprvat.annotations.annotations.readYamlColumns .. autodoc2-docstring:: deeprvat.annotations.annotations.readYamlColumns .. py:function:: get_parquet_columns(parquet_file) :canonical: deeprvat.annotations.annotations.get_parquet_columns .. autodoc2-docstring:: deeprvat.annotations.annotations.get_parquet_columns .. py:function:: cli() :canonical: deeprvat.annotations.annotations.cli .. autodoc2-docstring:: deeprvat.annotations.annotations.cli .. py:function:: filter_annotations_by_exon_distance(anno_path: str, gtf_path: str, genes_path: str, output_path: str, max_dist: int) -> None :canonical: deeprvat.annotations.annotations.filter_annotations_by_exon_distance .. autodoc2-docstring:: deeprvat.annotations.annotations.filter_annotations_by_exon_distance .. py:function:: deepsea_pca(deepsea_file: str, pca_object: str, means_sd_df: str, out_dir: str, n_components: int) :canonical: deeprvat.annotations.annotations.deepsea_pca .. autodoc2-docstring:: deeprvat.annotations.annotations.deepsea_pca .. py:function:: scorevariants_deepripe(variants_file: str, output_dir: str, genomefasta: str, pybedtools_tmp_dir: str, saved_deepripe_models_path: str, n_jobs: int, saved_model_type: str = 'parclip') :canonical: deeprvat.annotations.annotations.scorevariants_deepripe .. autodoc2-docstring:: deeprvat.annotations.annotations.scorevariants_deepripe .. py:function:: process_chunk(chrom_file, abs_splice_res_dir, tissues_to_exclude, tissue_agg_function, ca_shortened) :canonical: deeprvat.annotations.annotations.process_chunk .. autodoc2-docstring:: deeprvat.annotations.annotations.process_chunk .. py:function:: aggregate_abscores(current_annotation_file: str, abs_splice_res_dir: str, absplice_score_file: str, njobs: int) :canonical: deeprvat.annotations.annotations.aggregate_abscores .. autodoc2-docstring:: deeprvat.annotations.annotations.aggregate_abscores .. py:data:: logger :canonical: deeprvat.annotations.annotations.logger :value: 'getLogger(...)' .. autodoc2-docstring:: deeprvat.annotations.annotations.logger .. py:function:: deepripe_score_variant_onlyseq_all(model_group, variant_bed, genomefasta, seq_len=200, batch_size=1024, n_jobs=32) :canonical: deeprvat.annotations.annotations.deepripe_score_variant_onlyseq_all .. autodoc2-docstring:: deeprvat.annotations.annotations.deepripe_score_variant_onlyseq_all .. py:function:: calculate_scores_max(scores) :canonical: deeprvat.annotations.annotations.calculate_scores_max .. autodoc2-docstring:: deeprvat.annotations.annotations.calculate_scores_max .. py:function:: merge_abscores(current_annotation_file: str, absplice_score_file: str, out_file: str) :canonical: deeprvat.annotations.annotations.merge_abscores .. autodoc2-docstring:: deeprvat.annotations.annotations.merge_abscores .. py:function:: merge_deepripe(annotation_file: str, deepripe_file: str, out_file: str, column_prefix: str) :canonical: deeprvat.annotations.annotations.merge_deepripe .. autodoc2-docstring:: deeprvat.annotations.annotations.merge_deepripe .. py:function:: merge_deepsea_pcas(annotation_file: str, deepripe_pca_file: str, column_yaml_file: str, out_file: str) :canonical: deeprvat.annotations.annotations.merge_deepsea_pcas .. autodoc2-docstring:: deeprvat.annotations.annotations.merge_deepsea_pcas .. py:function:: process_chunk_addids(chunk: pandas.DataFrame, variants: pandas.DataFrame) -> pandas.DataFrame :canonical: deeprvat.annotations.annotations.process_chunk_addids .. autodoc2-docstring:: deeprvat.annotations.annotations.process_chunk_addids .. py:function:: add_ids(annotation_file: str, variant_file: str, njobs: int, out_file: str) :canonical: deeprvat.annotations.annotations.add_ids .. autodoc2-docstring:: deeprvat.annotations.annotations.add_ids .. py:function:: add_ids_dask(annotation_file: str, variant_file: str, out_file: str) :canonical: deeprvat.annotations.annotations.add_ids_dask .. autodoc2-docstring:: deeprvat.annotations.annotations.add_ids_dask .. py:function:: chunks(lst, n) :canonical: deeprvat.annotations.annotations.chunks .. autodoc2-docstring:: deeprvat.annotations.annotations.chunks .. py:function:: read_deepripe_file(f: str) :canonical: deeprvat.annotations.annotations.read_deepripe_file .. autodoc2-docstring:: deeprvat.annotations.annotations.read_deepripe_file .. py:function:: concatenate_deepsea(deepsea_files: str, out_file: str, njobs: int) :canonical: deeprvat.annotations.annotations.concatenate_deepsea .. autodoc2-docstring:: deeprvat.annotations.annotations.concatenate_deepsea .. py:function:: merge_annotations(vep_header_line: int, vep_file: str, deepripe_parclip_file: str, deepripe_hg2_file: str, deepripe_k5_file: str, variant_file: str, vcf_file: str, out_file: str, column_yaml: str) :canonical: deeprvat.annotations.annotations.merge_annotations .. autodoc2-docstring:: deeprvat.annotations.annotations.merge_annotations .. py:function:: process_deepripe(deepripe_df: pandas.DataFrame, column_prefix: str) -> pandas.DataFrame :canonical: deeprvat.annotations.annotations.process_deepripe .. autodoc2-docstring:: deeprvat.annotations.annotations.process_deepripe .. py:function:: process_vep(vep_file: pandas.DataFrame, vcf_file: str, types_mapping: dict) -> pandas.DataFrame :canonical: deeprvat.annotations.annotations.process_vep .. autodoc2-docstring:: deeprvat.annotations.annotations.process_vep .. py:function:: compute_plof(anno_df_in, anno_df_out) :canonical: deeprvat.annotations.annotations.compute_plof .. autodoc2-docstring:: deeprvat.annotations.annotations.compute_plof .. py:function:: concat_annotations(filenames: str, out_file: str) :canonical: deeprvat.annotations.annotations.concat_annotations .. autodoc2-docstring:: deeprvat.annotations.annotations.concat_annotations .. py:function:: get_af_from_gt(genotype_file: str, variants_filepath: str, out_file: str) :canonical: deeprvat.annotations.annotations.get_af_from_gt .. autodoc2-docstring:: deeprvat.annotations.annotations.get_af_from_gt .. py:function:: merge_af(annotations_path: str, af_df_path: str, out_file: str) :canonical: deeprvat.annotations.annotations.merge_af .. autodoc2-docstring:: deeprvat.annotations.annotations.merge_af .. py:function:: calculate_maf(annotations_path: str, out_file: str, af_column_name: str) :canonical: deeprvat.annotations.annotations.calculate_maf .. autodoc2-docstring:: deeprvat.annotations.annotations.calculate_maf .. py:function:: add_gene_ids(gene_id_file: str, annotations_path: str, out_file: str) :canonical: deeprvat.annotations.annotations.add_gene_ids .. autodoc2-docstring:: deeprvat.annotations.annotations.add_gene_ids .. py:function:: create_gene_id_file(gtf_filepath: str, out_file: str) :canonical: deeprvat.annotations.annotations.create_gene_id_file .. autodoc2-docstring:: deeprvat.annotations.annotations.create_gene_id_file .. py:function:: select_rename_fill_annotations(annotation_columns_yaml_file: str, annotations_path: str, out_file: str, keep_unfilled: str) :canonical: deeprvat.annotations.annotations.select_rename_fill_annotations .. autodoc2-docstring:: deeprvat.annotations.annotations.select_rename_fill_annotations .. py:function:: aggregate_and_concat_absplice(absplice_dir: str, ab_splice_agg_score_file: str) -> None :canonical: deeprvat.annotations.annotations.aggregate_and_concat_absplice .. autodoc2-docstring:: deeprvat.annotations.annotations.aggregate_and_concat_absplice .. py:function:: merge_absplice_scores(annotations, variants, genes, ab_splice_agg_score_file, output, verbose, mem_limit, fill_nan) :canonical: deeprvat.annotations.annotations.merge_absplice_scores .. autodoc2-docstring:: deeprvat.annotations.annotations.merge_absplice_scores