[med-svn] [Git][med-team/ataqv][upstream] New upstream version 1.2.1+ds

Andreas Tille gitlab at salsa.debian.org
Thu Oct 1 12:42:15 BST 2020



Andreas Tille pushed to branch upstream at Debian Med / ataqv


Commits:
7e5d5230 by Andreas Tille at 2020-10-01T13:24:21+02:00
New upstream version 1.2.1+ds
- - - - -


12 changed files:

- .gitignore
- Makefile
- README.rst
- src/cpp/HTS.cpp
- src/cpp/Metrics.cpp
- src/cpp/Metrics.hpp
- src/cpp/Version.hpp
- src/cpp/ataqv.cpp
- src/cpp/test_metrics.cpp
- src/scripts/mkarv
- src/web/index.html
- src/web/js/ataqv.js


Changes:

=====================================
.gitignore
=====================================
@@ -2,6 +2,8 @@
 build
 testing
 README.html
+debian/.debhelper
+debian/ataqv.debhelper.log
 debian/ataqv.substvars
 debian/ataqv/
 debian/debhelper-build-stamp


=====================================
Makefile
=====================================
@@ -2,7 +2,7 @@
 # VARIABLES
 #
 
-VERSION = 1.1.1
+VERSION = 1.2.1
 
 #
 # PATHS


=====================================
README.rst
=====================================
@@ -54,6 +54,12 @@ Help
 If you have questions or suggestions, mail us at
 `parkerlab-software at umich.edu`_, or file a `GitHub issue`_.
 
+****
+Citing
+****
+
+Ataqv is now published in Cell Systems: https://doi.org/10.1016/j.cels.2020.02.009
+
 ***************
 Getting started
 ***************
@@ -203,8 +209,59 @@ for the output.
 Running
 =======
 
-The main program is ataqv. Run ``ataqv --help`` for complete
-instructions.
+The main program is ataqv, which is run as follows::
+  
+  ataqv [options] organism alignment-file
+  
+  where:
+      organism is the subject of the experiment, which determines the list of autosomes
+      (see "Reference Genome Configuration" below).
+  
+      alignment-file is a BAM file with duplicate reads marked.
+  
+  Basic options
+  -------------
+  
+  --help: show this usage message.
+  --verbose: show more details and progress updates.
+  --version: print the version of the program.
+  --threads <n>: the maximum number of threads to use (right now, only for calculating TSS enrichment).
+  
+  Optional Input
+  --------------
+  
+  --peak-file "file name"
+      A BED file of peaks called for alignments in the BAM file. Specify "auto" to use the
+      BAM file name with ".peaks" appended, or if the BAM file contains read groups, to
+      assume each read group has a peak file whose name is the read group ID with ".peaks"
+      appended. If you specify a single filename instead of "auto" with read groups, the 
+      same peaks will be used for all reads -- be sure this is what you want.
+  
+  --tss-file "file name"
+      A BED file of transcription start sites for the experiment organism. If supplied,
+      a TSS enrichment score will be calculated according to the ENCODE data standards.
+      This calculation requires that the BAM file of alignments be indexed.
+  
+  --tss-extension "size"
+      If a TSS enrichment score is requested, it will be calculated for a region of 
+      "size" bases to either side of transcription start sites. The default is 1000bp.
+  
+  --excluded-region-file "file name"
+      A BED file containing excluded regions. Peaks or TSS overlapping these will be ignored.
+      May be given multiple times.
+  
+  Output
+  ------
+  
+  --metrics-file "file name"
+      The JSON file to which metrics will be written. The default filename will be based on
+      the BAM file, with the suffix ".ataqv.json".
+  
+  --log-problematic-reads
+      If given, problematic reads will be logged to a file per read group, with names
+      derived from the read group IDs, with ".problems" appended. If no read groups
+      are found, the reads will be written to one file named after the BAM file.
+
 
 When run, ataqv prints a human-readable summary to its standard
 output, and writes complete metrics to the JSON file named with the


=====================================
src/cpp/HTS.cpp
=====================================
@@ -37,7 +37,7 @@ sam_header parse_sam_header(const std::string &header_text) {
             std::stringstream field_stream(field);
             for (std::string field_text; std::getline(field_stream, field_text, '\t');) {
                 std::vector<std::string> splitfield = split(field_text, ":");
-                field_map[splitfield[0]] = splitfield[1];
+                field_map[splitfield[0]] = splitfield.size() > 1 ? splitfield[1] : "";
             }
         }
         header[header_tag].push_back(field_map);


=====================================
src/cpp/Metrics.cpp
=====================================
@@ -37,6 +37,7 @@ MetricsCollector::MetricsCollector(const std::string& name,
                                    const int thread_limit,
                                    bool ignore_read_groups,
                                    bool log_problematic_reads,
+                                   bool less_redundant,
                                    const std::vector<std::string>& excluded_region_filenames) :
     metrics({}),
     name(name),
@@ -54,6 +55,7 @@ MetricsCollector::MetricsCollector(const std::string& name,
     thread_limit(thread_limit),
     ignore_read_groups(ignore_read_groups),
     log_problematic_reads(log_problematic_reads),
+    less_redundant(less_redundant),
     excluded_region_filenames(excluded_region_filenames)
 {
 
@@ -425,7 +427,7 @@ void MetricsCollector::load_alignments() {
 }
 
 
-Metrics::Metrics(MetricsCollector* collector, const std::string& name): collector(collector), name(name), peaks(), log_problematic_reads(collector->log_problematic_reads) {
+Metrics::Metrics(MetricsCollector* collector, const std::string& name): collector(collector), name(name), peaks(), log_problematic_reads(collector->log_problematic_reads), less_redundant(collector->less_redundant) {
 
     if (log_problematic_reads) {
         try {
@@ -1252,11 +1254,13 @@ std::ostream& operator<<(std::ostream& os, const Metrics& m) {
        << std::endl
 
        << "  Aberrant Mapping Metrics" << std::endl
-       << "  ------------------------" << std::endl
-       << std::setfill(' ') << std::left << std::setw(40) << "  RF reads: " << m.rf_reads << percentage_string(m.rf_reads, m.total_reads, 6) << std::endl
-       << std::setfill(' ') << std::left << std::setw(40) << "  FF reads: " << m.ff_reads << percentage_string(m.ff_reads, m.total_reads, 6) << std::endl
-       << std::setfill(' ') << std::left << std::setw(40) << "  RR reads: " << m.rr_reads << percentage_string(m.rr_reads, m.total_reads, 6) << std::endl
-       << std::setfill(' ') << std::left << std::setw(40) << "  Reads that paired and mapped but..." << std::endl
+       << "  ------------------------" << std::endl;
+    if (!m.less_redundant) {
+        os << std::setfill(' ') << std::left << std::setw(40) << "  RF reads: " << m.rf_reads << percentage_string(m.rf_reads, m.total_reads, 6) << std::endl
+           << std::setfill(' ') << std::left << std::setw(40) << "  FF reads: " << m.ff_reads << percentage_string(m.ff_reads, m.total_reads, 6) << std::endl
+           << std::setfill(' ') << std::left << std::setw(40) << "  RR reads: " << m.rr_reads << percentage_string(m.rr_reads, m.total_reads, 6) << std::endl;
+    }
+    os << std::setfill(' ') << std::left << std::setw(40) << "  Reads that paired and mapped but..." << std::endl
        << std::setfill(' ') << std::left << std::setw(40) << "    on different chromosomes: " << m.reads_with_mate_mapped_to_different_reference << percentage_string(m.reads_with_mate_mapped_to_different_reference, m.total_reads) << std::endl
        << std::setfill(' ') << std::left << std::setw(40) << "    probably too far from their mates: " << m.reads_with_mate_too_distant << percentage_string(m.reads_with_mate_too_distant, m.total_reads) << " (longest proper fragment seems to be " << m.maximum_proper_pair_fragment_size << ")" << std::endl
        << std::setfill(' ') << std::left << std::setw(40) << "    just not properly: " << m.reads_mapped_and_paired_but_improperly << percentage_string(m.reads_mapped_and_paired_but_improperly, m.total_reads) << std::endl
@@ -1264,19 +1268,25 @@ std::ostream& operator<<(std::ostream& os, const Metrics& m) {
        << std::endl
 
        << "  Autosomal/Mitochondrial Metrics" << std::endl
-       << "  -------------------------------" << std::endl
-       << "  Total autosomal reads: " << m.total_autosomal_reads << percentage_string(m.total_autosomal_reads, m.total_reads, 3,  " (", "% of all reads)") << std::endl
-       << "  Total mitochondrial reads: " << m.total_mitochondrial_reads << percentage_string(m.total_mitochondrial_reads, m.total_reads, 3, " (", "% of all reads)") << std::endl
-       << "  Duplicate autosomal reads: " << m.duplicate_autosomal_reads << percentage_string(m.duplicate_autosomal_reads, m.total_autosomal_reads, 3, " (", "% of all autosomal reads)") << std::endl
-       << "  Duplicate mitochondrial reads: " << m.duplicate_mitochondrial_reads << percentage_string(m.duplicate_mitochondrial_reads, m.total_mitochondrial_reads, 3, " (", "% of all mitochondrial reads)") << std::endl << std::endl
+       << "  -------------------------------" << std::endl;
+    if (!m.less_redundant) {
+       os << "  Total autosomal reads: " << m.total_autosomal_reads << percentage_string(m.total_autosomal_reads, m.total_reads, 3,  " (", "% of all reads)") << std::endl;
+    }
+       os << "  Total mitochondrial reads: " << m.total_mitochondrial_reads << percentage_string(m.total_mitochondrial_reads, m.total_reads, 3, " (", "% of all reads)") << std::endl
+       << "  Duplicate autosomal reads: " << m.duplicate_autosomal_reads << percentage_string(m.duplicate_autosomal_reads, m.total_autosomal_reads, 3, " (", "% of all autosomal reads)") << std::endl;
+    if (!m.less_redundant) {
+       os << "  Duplicate mitochondrial reads: " << m.duplicate_mitochondrial_reads << percentage_string(m.duplicate_mitochondrial_reads, m.total_mitochondrial_reads, 3, " (", "% of all mitochondrial reads)") << std::endl << std::endl;
+    }
 
-       << std::endl
+    os << std::endl
 
        << "  Mapping Quality" << std::endl
-       << "  ---------------" << std::endl
-       << "  Mean MAPQ: " << std::fixed << m.mean_mapq() << std::endl
-       << "  Median MAPQ: " << std::fixed << m.median_mapq() << std::endl
-       << "  Reads with MAPQ >=..." << std::endl;
+       << "  ---------------" << std::endl;
+    if (!m.less_redundant) {
+       os << "  Mean MAPQ: " << std::fixed << m.mean_mapq() << std::endl
+       << "  Median MAPQ: " << std::fixed << m.median_mapq() << std::endl;
+    }
+    os << "  Reads with MAPQ >=..." << std::endl;
 
     for (int threshold = 5; threshold <= 30; threshold += 5) {
         unsigned long long int count = 0;


=====================================
src/cpp/Metrics.hpp
=====================================
@@ -66,6 +66,7 @@ public:
     int thread_limit = 1;
     bool ignore_read_groups = false;
     bool log_problematic_reads = false;
+    bool less_redundant = false;
 
     std::vector<std::string> excluded_region_filenames = {};
     std::vector<Feature> excluded_regions = {};
@@ -85,6 +86,7 @@ public:
                      const int thread_limit = 1,
                      bool ignore_read_groups = false,
                      bool log_problematic_reads = false,
+                     bool less_redundant = false,
                      const std::vector<std::string>& excluded_region_filenames = {});
 
     std::string autosomal_reference_string(std::string separator = ", ") const;
@@ -198,6 +200,7 @@ public:
     bool log_problematic_reads = false;
     bool peaks_requested = false;
     bool tss_requested = false;
+    bool less_redundant = false;
 
     Metrics(MetricsCollector* collector, const std::string& name = nullptr);
 


=====================================
src/cpp/Version.hpp
=====================================
@@ -4,4 +4,4 @@
 // Licensed under Version 3 of the GPL or any later version
 //
 
-#define VERSION "1.1.1"
+#define VERSION "1.2.1"


=====================================
src/cpp/ataqv.cpp
=====================================
@@ -38,6 +38,7 @@ enum {
 
     OPT_METRICS_FILE,
     OPT_LOG_PROBLEMATIC_READS,
+    OPT_LESS_REDUNDANT,
 
     OPT_NAME,
     OPT_IGNORE_READ_GROUPS,
@@ -111,7 +112,10 @@ void print_usage() {
               << "--log-problematic-reads" << std::endl
               << "    If given, problematic reads will be logged to a file per read group, with names" << std::endl
               << "    derived from the read group IDs, with \".problems\" appended. If no read groups" << std::endl
-              << "    are found, the reads will be written to one file named after the BAM file." << std::endl
+              << "    are found, the reads will be written to one file named after the BAM file." << std::endl << std::endl
+
+	      << "--less-redundant" << std::endl
+              << "    If given, output a subset of metrics that should be less redundant. If this flag is used, the same flag should be passed to mkarv when making the viewer." << std::endl
 
               << std::endl
 
@@ -212,6 +216,7 @@ int main(int argc, char **argv) {
     bool verbose = false;
     int thread_limit = 1;
     bool log_problematic_reads = false;
+    bool less_redundant = false;
 
     std::string name;
     bool ignore_read_groups = false;
@@ -238,6 +243,7 @@ int main(int argc, char **argv) {
         {"version", no_argument, nullptr, OPT_VERSION},
         {"threads", required_argument, nullptr, OPT_THREADS},
         {"log-problematic-reads", no_argument, nullptr, OPT_LOG_PROBLEMATIC_READS},
+        {"less-redundant", no_argument, nullptr, OPT_LESS_REDUNDANT},
         {"name", required_argument, nullptr, OPT_NAME},
         {"ignore-read-groups", no_argument, nullptr, OPT_IGNORE_READ_GROUPS},
         {"description", required_argument, nullptr, OPT_DESCRIPTION},
@@ -271,6 +277,9 @@ int main(int argc, char **argv) {
         case OPT_LOG_PROBLEMATIC_READS:
             log_problematic_reads = true;
             break;
+	case OPT_LESS_REDUNDANT:
+            less_redundant = true;
+            break;
         case OPT_NAME:
             name = optarg;
             break;
@@ -355,6 +364,7 @@ int main(int argc, char **argv) {
             thread_limit,
             ignore_read_groups,
             log_problematic_reads,
+            less_redundant,
             excluded_region_filenames);
 
         // if the filename for the metrics output wasn't specified,


=====================================
src/cpp/test_metrics.cpp
=====================================
@@ -63,7 +63,7 @@ TEST_CASE("MetricsCollector::test_supplied_references", "[metrics/test_supplied_
         *out << "I\nII\nIII\n";
     }
 
-    MetricsCollector collector("Test collector", "human", "a collector for unit tests", "a library of brutal tests?", "https://theparkerlab.org", "test.bam", autosomal_reference_file, "M", "", "", 1000, true);
+    MetricsCollector collector("Test collector", "human", "a collector for unit tests", "a library of brutal tests?", "https://theparkerlab.org", "test.bam", autosomal_reference_file, "M", "", "", 1000, true, false);
 
     std::remove(autosomal_reference_file.c_str());
 
@@ -92,7 +92,7 @@ TEST_CASE("Metrics::load_alignments with no excluded regions", "[metrics/load_al
     std::string alignment_file_name("SRR891275.bam");
     std::string peak_file_name("SRR891275.peaks.gz");
 
-    MetricsCollector collector(name, "human", "a collector for unit tests", "a library of brutal tests?", "https://theparkerlab.org", alignment_file_name, "", "chrM", peak_file_name, "", true);
+    MetricsCollector collector(name, "human", "a collector for unit tests", "a library of brutal tests?", "https://theparkerlab.org", alignment_file_name, "", "chrM", peak_file_name, "", true, false);
 
     collector.load_alignments();
 
@@ -108,7 +108,7 @@ TEST_CASE("Metrics::load_alignments", "[metrics/load_alignments]") {
     std::string peak_file_name("test.peaks.gz");
     std::string tss_file_name("hg19.tss.refseq.bed.gz");
 
-    MetricsCollector collector(name, "human", "a collector for unit tests", "a library of brutal tests?", "https://theparkerlab.org", alignment_file_name, "", "chrM", peak_file_name, tss_file_name, 1000, true, 1, false, true, {"exclude.dac.bed.gz", "exclude.duke.bed.gz"});
+    MetricsCollector collector(name, "human", "a collector for unit tests", "a library of brutal tests?", "https://theparkerlab.org", alignment_file_name, "", "chrM", peak_file_name, tss_file_name, 1000, true, 1, false, true, false, {"exclude.dac.bed.gz", "exclude.duke.bed.gz"});
 
     collector.load_alignments();
 
@@ -183,7 +183,7 @@ TEST_CASE("Metrics::ignore_read_groups", "[metrics/ignore_read_groups]") {
     std::string alignment_file_name("test.bam");
     std::string peak_file_name("test.peaks.gz");
 
-    MetricsCollector collector(name, "human", "a collector for unit tests", "a library of brutal tests?", "https://theparkerlab.org", alignment_file_name, "", "chrM", peak_file_name, "", 1000, true, 1, true, true, {"exclude.dac.bed.gz", "exclude.duke.bed.gz"});
+    MetricsCollector collector(name, "human", "a collector for unit tests", "a library of brutal tests?", "https://theparkerlab.org", alignment_file_name, "", "chrM", peak_file_name, "", 1000, true, 1, true, true, false, {"exclude.dac.bed.gz", "exclude.duke.bed.gz"});
 
     collector.load_alignments();
 
@@ -244,7 +244,7 @@ TEST_CASE("Metrics::missing_peak_file", "[metrics/missing_peak_file]") {
     std::string alignment_file_name("test.bam");
     std::string peak_file_name("notthere.peaks.gz");
 
-    MetricsCollector collector(name, "human", "a collector for unit tests", "a library of brutal tests?", "https://theparkerlab.org", alignment_file_name, "", "chrM", peak_file_name, "", 1000, true, 1, true, true, {"exclude.dac.bed.gz", "exclude.duke.bed.gz"});
+    MetricsCollector collector(name, "human", "a collector for unit tests", "a library of brutal tests?", "https://theparkerlab.org", alignment_file_name, "", "chrM", peak_file_name, "", 1000, true, 1, true, true, false, {"exclude.dac.bed.gz", "exclude.duke.bed.gz"});
     REQUIRE_THROWS_AS(collector.load_alignments(), FileException);
 }
 
@@ -254,6 +254,6 @@ TEST_CASE("Metrics::missing_tss_file", "[metrics/missing_ss_file]") {
     std::string peak_file_name("test.peaks.gz");
     std::string tss_file_name("notthere.bed.gz");
 
-    MetricsCollector collector(name, "human", "a collector for unit tests", "a library of brutal tests?", "https://theparkerlab.org", alignment_file_name, "", "chrM", peak_file_name, tss_file_name, 1000, true, 1, true, true, {"exclude.dac.bed.gz", "exclude.duke.bed.gz"});
+    MetricsCollector collector(name, "human", "a collector for unit tests", "a library of brutal tests?", "https://theparkerlab.org", alignment_file_name, "", "chrM", peak_file_name, tss_file_name, 1000, true, 1, true, true, false, {"exclude.dac.bed.gz", "exclude.duke.bed.gz"});
     REQUIRE_THROWS_AS(collector.load_alignments(), FileException);
 }


=====================================
src/scripts/mkarv
=====================================
@@ -256,6 +256,7 @@ def parse_arguments():
     parser.add_argument('-d', '--description', help='A description for the viewer instance.')
     parser.add_argument('-f', '--force', action='store_true', help='Overwrite the output directory if it exists.')
     parser.add_argument('-i', '--indent', action='store_true', help='If indent is given, JSON output will be pretty-printed and indented.')
+    parser.add_argument('-l', '--less-redundant', action='store_true', help='Produce a viewer with fewer metrics (metrics that are expected to be largely redundant will not be displayed.')
     parser.add_argument('-m', '--maximum-fragment-length', type=int, default=1000, help='The maximum fragment length for which the distance to the reference fragment length count distribution will be measured.')
 
     parser.add_argument('-p', '--peak-reference', default="SRR891268", help=(
@@ -285,7 +286,7 @@ def parse_arguments():
         """each line contains a fragment length and count. It may """
     ))
 
-    parser.add_argument('-t', '--template-directory', default=locate_template_directory(sys.argv[0]), help=("""The location of the web app directory template."""))
+    parser.add_argument('-t', '--template-directory', default='auto', help=("""The location of the web app directory template."""))
 
     parser.add_argument('-v', '--verbose', action='store_true', help='Talk more.')
     parser.add_argument('--version', action='version', version=PROGRAM_VERSION)
@@ -569,6 +570,9 @@ def write_metrics(indent, metrics):
 if __name__ == '__main__':
     args = parse_arguments()
 
+    if args.template_directory == 'auto':
+        args.template_directory = locate_template_directory(sys.argv[0])
+
     loglevel = args.verbose and logging.DEBUG or logging.INFO
     logging.basicConfig(level=loglevel, format=LOGGING_FORMAT)
     logger = logging.getLogger(PROGRAM)
@@ -599,7 +603,7 @@ if __name__ == '__main__':
     logger.info('Creating data directory {}'.format(data_directory))
     os.makedirs(data_directory, 0o0755)
 
-    configuration = {'description': args.description or '', 'metrics': {}}
+    configuration = {'description': args.description or '', 'metrics': {}, 'less_redundant': args.less_redundant}
 
     loader = functools.partial(load_metrics, data_directory)
     loaded_metrics = pool and pool.imap(loader, args.metrics) or (loader(metrics_filename) for metrics_filename in args.metrics)


=====================================
src/web/index.html
=====================================
@@ -170,9 +170,9 @@
                                                     <option value="short_mononucleosomal_ratio">Short-to-mononucleosomal ratio</option>
                                                     <option value="tss_enrichment">TSS enrichment</option>
                                                     <option value="max_fraction_reads_from_single_autosome">Maximum fraction of reads from a single autosome</option>
-                                                    <option value="duplicate_fraction_in_peaks">Duplicate fraction in peaks</option>
-                                                    <option value="duplicate_fraction_not_in_peaks">Duplicate fraction outside of peaks</option>
-                                                    <option value="peak_duplicate_ratio">Peak duplicate ratio</option>
+                                                    <option class="redundant" value="duplicate_fraction_in_peaks">Duplicate fraction in peaks</option>
+                                                    <option class="redundant" value="duplicate_fraction_not_in_peaks">Duplicate fraction outside of peaks</option>
+                                                    <option class="redundant" value="peak_duplicate_ratio">Peak duplicate ratio</option>
                                                 </select>
                                             </label>
                                         </div>
@@ -349,16 +349,16 @@
                                     <th data-metric="max_fraction_reads_from_single_autosome" data-priority="1">
                                         <span data-hovertext="The fraction of HQAA reads derived from the autosome with the greatest number of HQAA reads. Ideally, this should be approximately equal to the length of the longest autosome divided by the summed length of all autosomes. Outliers in this metric may reflect abnormal karyotypes or, in the case of single-cell/single-nucleus data, it may indicate that DNA from another source is being assigned to that cell/nucleus.">Max. fraction HQAA from one autosome</span>
                                     </th>
-                                    <th data-metric="duplicate_fraction_in_peaks" data-priority="1">
+                                    <th class="redundant" data-metric="duplicate_fraction_in_peaks" data-priority="1">
                                         <span data-hovertext="The fraction of properly paired reads that mapped within peaks and were marked as duplicates.">Duplicate fraction in peaks</span>
                                     </th>
 
-                                    <th data-metric="duplicate_fraction_not_in_peaks" data-priority="1">
+                                    <th class="redundant" data-metric="duplicate_fraction_not_in_peaks" data-priority="1">
                                         <span data-hovertext="The fraction of properly paired reads that mapped outside of peaks and were marked as duplicates.">Duplicate fraction outside of peaks</span>
                                     </th>
 
-                                    <th data-metric="peak_duplicate_ratio" data-priority="1">
-                                        <span data-hovertext="The ratio of the fraction of properly paired reads that mapped outside of peaks and were marked as duplicates to the fraction of properly paired reads that mapped within peaks and were marked as duplicates.">Peak duplicate ratio</span>
+                                    <th class="redundant" data-metric="peak_duplicate_ratio" data-priority="1">
+                                        <span class="redundant" data-hovertext="The ratio of the fraction of properly paired reads that mapped outside of peaks and were marked as duplicates to the fraction of properly paired reads that mapped within peaks and were marked as duplicates.">Peak duplicate ratio</span>
                                     </th>
                                 </tr>
                             </thead>
@@ -396,10 +396,10 @@
                                     <th data-metric="percentages.duplicate_reads__total_reads" data-priority="1">
                                         <span data-hovertext="Duplicate alignments as a percentage of total reads.">Duplicate (%)</span>
                                     </th>
-                                    <th data-metric="mean_mapq" data-priority="1">
+                                    <th class="redundant" data-metric="mean_mapq" data-priority="1">
                                         <span data-hovertext="The mean mapping quality of the experiment's reads.">Mean mapping quality</span>
                                     </th>
-                                    <th data-metric="median_mapq" data-metrictype="integer" data-priority="1">
+                                    <th class="redundant" data-metric="median_mapq" data-metrictype="integer" data-priority="1">
                                         <span data-hovertext="The median mapping quality of the experiment's reads.">Median mapping quality</span>
                                     </th>
                                 </tr>
@@ -463,13 +463,13 @@
                                 </tr>
 
                                 <tr>
-                                    <th data-metric="percentages.rf_reads__total_reads" data-priority="1">
+                                    <th class="redundant" data-metric="percentages.rf_reads__total_reads" data-priority="1">
                                         <span class="for-export">Of all reads, the percentage that paired and mapped but </span><span data-hovertext="The reads of a proper pair should point toward each other, with the end mapped to the smaller coordinate on the forward strand and the other end on the reverse strand -- FR orientation. These reads were in pairs oriented RF, where the smaller coordinate was on the reverse strand and the larger on the forward strand.">RF</span>
                                     </th>
-                                    <th data-metric="percentages.ff_reads__total_reads" data-priority="1">
+                                    <th class="redundant" data-metric="percentages.ff_reads__total_reads" data-priority="1">
                                         <span class="for-export">Of all reads, the percentage that paired and mapped but </span><span data-hovertext="The reads of a proper pair should point toward each other, with the end mapped to the smaller coordinate on the forward strand and the other end on the reverse strand -- FR orientation. These reads were in pairs oriented FF, where both reads mapped on the forward strand.">FF</span>
                                     </th>
-                                    <th data-metric="percentages.rr_reads__total_reads" data-priority="1">
+                                    <th class="redundant" data-metric="percentages.rr_reads__total_reads" data-priority="1">
                                         <span class="for-export">Of all reads, the percentage that paired and mapped but </span><span data-hovertext="The reads of a proper pair should point toward each other, with the end mapped to the smaller coordinate on the forward strand and the other end on the reverse strand -- FR orientation. These reads were in pairs oriented RR, where both reads mapped on the reverse strand.">RR</span>
                                     </th>
                                     <th data-metric="percentages.reads_with_mate_mapped_to_different_reference__total_reads" data-priority="1">
@@ -507,7 +507,7 @@
                                 </tr>
 
                                 <tr>
-                                    <th data-metric="percentages.total_autosomal_reads__total_reads" data-priority="1">
+                                    <th class="redundant" data-metric="percentages.total_autosomal_reads__total_reads" data-priority="1">
                                         <span class="for-export">Autosomal, </span><span data-hovertext="The number of reads aligned to autosomes, as a percentage of all reads.">% of all reads</span>
                                     </th>
                                     <th data-metric="percentages.duplicate_autosomal_reads__total_autosomal_reads" data-priority="1">
@@ -516,7 +516,7 @@
                                     <th data-metric="percentages.total_mitochondrial_reads__total_reads" data-priority="1">
                                         <span class="for-export">Mitochondrial, </span><span data-hovertext="The number of reads aligned to the mitochondrial reference, as a percentage of all reads.">% of all reads</span>
                                     </th>
-                                    <th data-metric="percentages.duplicate_mitochondrial_reads__total_mitochondrial_reads" data-priority="1">
+                                    <th class="redundant" data-metric="percentages.duplicate_mitochondrial_reads__total_mitochondrial_reads" data-priority="1">
                                         <span class="for-export">Mitochondrial, </span><span data-hovertext="The percentage of reads mapped to the mitochondrial reference that were duplicates.">Duplicates (% of mitochondrial alignments)</span>
                                     </th>
                                 </tr>


=====================================
src/web/js/ataqv.js
=====================================
@@ -1588,6 +1588,9 @@ let ataqv = (function() {
 
             for (let headerCell of querySelectorAll(['th[data-metric]'], table)) {
                 let key = headerCell.dataset.metric;
+		    if (configuration.less_redundant && headerCell.className == 'redundant') {
+			continue;
+		    }
                 keys.push(key);
 
                 let col = {
@@ -1831,6 +1834,11 @@ let ataqv = (function() {
         }
 
         loadExperiments();
+
+	if (configuration.less_redundant) {
+	    d3.selectAll('.redundant').style("display", "none");
+	    $('[colspan=2]').attr("colspan", "1");
+	}
     }
 
     function configure(conf) {



View it on GitLab: https://salsa.debian.org/med-team/ataqv/-/commit/7e5d52302338e2326b96c34d7da88ac8da3594df

-- 
View it on GitLab: https://salsa.debian.org/med-team/ataqv/-/commit/7e5d52302338e2326b96c34d7da88ac8da3594df
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20201001/2252551a/attachment-0001.html>


More information about the debian-med-commit mailing list