nodes: 0, module; 1, function_definition; 2, function_name:report; 3, parameters; 4, block; 5, identifier:self; 6, identifier:align_bam; 7, identifier:ref_file; 8, identifier:is_paired; 9, identifier:bait_file; 10, identifier:target_file; 11, identifier:variant_region_file; 12, identifier:config; 13, expression_statement; 14, expression_statement; 15, expression_statement; 16, comment:# Prefer the GC metrics in FastQC instead of Picard; 17, comment:# gc_graph, gc_metrics = self._gc_bias(align_bam, ref_file); 18, expression_statement; 19, expression_statement; 20, if_statement; 21, if_statement; 22, expression_statement; 23, expression_statement; 24, expression_statement; 25, if_statement; 26, if_statement; 27, return_statement; 28, comment:"""Produce report metrics using Picard with sorted aligned BAM file.
          """; 29, assignment; 30, assignment; 31, assignment; 32, assignment; 33, identifier:is_paired; 34, block; 35, boolean_operator; 36, block; 37, elif_clause; 38, assignment; 39, assignment; 40, assignment; 41, boolean_operator; 42, block; 43, boolean_operator; 44, block; 45, expression_list; 46, identifier:dup_metrics; 47, call; 48, identifier:align_metrics; 49, call; 50, identifier:gc_graph; 51, None; 52, pattern_list; 53, tuple; 54, expression_statement; 55, identifier:bait_file; 56, identifier:target_file; 57, assert_statement; 58, assert_statement; 59, expression_statement; 60, parenthesized_expression; 61, block; 62, identifier:vrn_vals; 63, call; 64, identifier:summary_info; 65, call; 66, identifier:graphs; 67, list; 68, identifier:gc_graph; 69, call; 70, expression_statement; 71, identifier:insert_graph; 72, call; 73, expression_statement; 74, identifier:summary_info; 75, identifier:graphs; 76, attribute; 77, argument_list; 78, attribute; 79, argument_list; 80, identifier:insert_graph; 81, identifier:insert_metrics; 82, identifier:hybrid_metrics; 83, None; 84, None; 85, None; 86, assignment; 87, call; 88, tuple; 89, call; 90, tuple; 91, assignment; 92, boolean_operator; 93, assert_statement; 94, expression_statement; 95, attribute; 96, argument_list; 97, attribute; 98, argument_list; 99, attribute; 100, argument_list; 101, call; 102, attribute; 103, argument_list; 104, call; 105, identifier:self; 106, identifier:_get_current_dup_metrics; 107, identifier:align_bam; 108, identifier:self; 109, identifier:_collect_align_metrics; 110, identifier:align_bam; 111, identifier:ref_file; 112, pattern_list; 113, call; 114, attribute; 115, argument_list; 116, identifier:bait_file; 117, string:"does not exist!"; 118, attribute; 119, argument_list; 120, identifier:target_file; 121, string:"does not exist!"; 122, identifier:hybrid_metrics; 123, call; 124, identifier:variant_region_file; 125, comparison_operator:config["algorithm"].get("coverage_interval", "").lower() in ["exome"]; 126, call; 127, tuple; 128, assignment; 129, identifier:self; 130, identifier:_variant_eval_metrics; 131, identifier:align_bam; 132, attribute; 133, identifier:get_summary_metrics; 134, identifier:align_metrics; 135, identifier:dup_metrics; 136, identifier:insert_metrics; 137, identifier:hybrid_metrics; 138, identifier:vrn_vals; 139, attribute; 140, identifier:exists; 141, identifier:gc_graph; 142, attribute; 143, argument_list; 144, attribute; 145, identifier:exists; 146, identifier:insert_graph; 147, attribute; 148, argument_list; 149, identifier:insert_graph; 150, identifier:insert_metrics; 151, attribute; 152, argument_list; 153, attribute; 154, identifier:exists; 155, identifier:bait_file; 156, attribute; 157, identifier:exists; 158, identifier:target_file; 159, attribute; 160, argument_list; 161, call; 162, list; 163, attribute; 164, argument_list; 165, identifier:variant_region_file; 166, string:"does not exist"; 167, identifier:hybrid_metrics; 168, call; 169, identifier:self; 170, identifier:_parser; 171, identifier:os; 172, identifier:path; 173, identifier:graphs; 174, identifier:append; 175, tuple; 176, identifier:os; 177, identifier:path; 178, identifier:graphs; 179, identifier:append; 180, tuple; 181, identifier:self; 182, identifier:_insert_sizes; 183, identifier:align_bam; 184, identifier:os; 185, identifier:path; 186, identifier:os; 187, identifier:path; 188, identifier:self; 189, identifier:_hybrid_select_metrics; 190, identifier:align_bam; 191, identifier:bait_file; 192, identifier:target_file; 193, attribute; 194, argument_list; 195, string:"exome"; 196, attribute; 197, identifier:exists; 198, identifier:variant_region_file; 199, attribute; 200, argument_list; 201, identifier:gc_graph; 202, string:"Distribution of GC content across reads"; 203, identifier:insert_graph; 204, string:"Distribution of paired end insert sizes"; 205, call; 206, identifier:lower; 207, identifier:os; 208, identifier:path; 209, identifier:self; 210, identifier:_hybrid_select_metrics; 211, identifier:align_bam; 212, identifier:variant_region_file; 213, identifier:variant_region_file; 214, attribute; 215, argument_list; 216, subscript; 217, identifier:get; 218, string:"coverage_interval"; 219, string:""; 220, identifier:config; 221, string:"algorithm"
code: def report(self, align_bam, ref_file, is_paired, bait_file, target_file,
                 variant_region_file, config):
          """Produce report metrics using Picard with sorted aligned BAM file.
          """
          dup_metrics = self._get_current_dup_metrics(align_bam)
          align_metrics = self._collect_align_metrics(align_bam, ref_file)
          # Prefer the GC metrics in FastQC instead of Picard
          # gc_graph, gc_metrics = self._gc_bias(align_bam, ref_file)
          gc_graph = None
          insert_graph, insert_metrics, hybrid_metrics = (None, None, None)
          if is_paired:
              insert_graph, insert_metrics = self._insert_sizes(align_bam)
          if bait_file and target_file:
              assert os.path.exists(bait_file), (bait_file, "does not exist!")
              assert os.path.exists(target_file), (target_file, "does not exist!")
              hybrid_metrics = self._hybrid_select_metrics(align_bam,
                                                           bait_file, target_file)
          elif (variant_region_file and
                config["algorithm"].get("coverage_interval", "").lower() in ["exome"]):
              assert os.path.exists(variant_region_file), (variant_region_file, "does not exist")
              hybrid_metrics = self._hybrid_select_metrics(
                  align_bam, variant_region_file, variant_region_file)
  
          vrn_vals = self._variant_eval_metrics(align_bam)
          summary_info = self._parser.get_summary_metrics(align_metrics,
                  dup_metrics, insert_metrics, hybrid_metrics,
                  vrn_vals)
          graphs = []
          if gc_graph and os.path.exists(gc_graph):
              graphs.append((gc_graph, "Distribution of GC content across reads"))
          if insert_graph and os.path.exists(insert_graph):
              graphs.append((insert_graph, "Distribution of paired end insert sizes"))
          return summary_info, graphs