Commit 3da88920 authored by Haowen Zhang's avatar Haowen Zhang
Browse files

Rename the variables for clearer meaninig.

parent 4237c1c0
Loading
Loading
Loading
Loading
+10 −9
Original line number Diff line number Diff line
@@ -172,8 +172,8 @@ void Chromap::MapSingleEndReads() {
  SequenceBatch reference;
  reference.InitializeLoading(mapping_parameters_.reference_file_path);
  uint32_t num_reference_sequences = reference.LoadAllSequences();
  if (mapping_parameters_.custom_rid_order_path.length() > 0) {
    GenerateCustomRidRanks(mapping_parameters_.custom_rid_order_path,
  if (mapping_parameters_.custom_rid_order_file_path.length() > 0) {
    GenerateCustomRidRanks(mapping_parameters_.custom_rid_order_file_path,
                           num_reference_sequences, reference,
                           custom_rid_rank_);
    reference.ReorderSequences(custom_rid_rank_);
@@ -340,7 +340,7 @@ void Chromap::MapSingleEndReads() {
                                          mapping_metadata.minimizers_);

            if (mapping_metadata.minimizers_.size() > 0) {
              if (mapping_parameters_.custom_rid_order_path.length() > 0) {
              if (mapping_parameters_.custom_rid_order_file_path.length() > 0) {
                RerankCandidatesRid(mapping_metadata.positive_candidates_);
                RerankCandidatesRid(mapping_metadata.negative_candidates_);
              }
@@ -541,16 +541,16 @@ void Chromap::MapPairedEndReads() {
  SequenceBatch reference;
  reference.InitializeLoading(mapping_parameters_.reference_file_path);
  uint32_t num_reference_sequences = reference.LoadAllSequences();
  if (mapping_parameters_.custom_rid_order_path.length() > 0) {
    GenerateCustomRidRanks(mapping_parameters_.custom_rid_order_path,
  if (mapping_parameters_.custom_rid_order_file_path.length() > 0) {
    GenerateCustomRidRanks(mapping_parameters_.custom_rid_order_file_path,
                           num_reference_sequences, reference,
                           custom_rid_rank_);
    reference.ReorderSequences(custom_rid_rank_);
  }
  if (mapping_parameters_.mapping_output_format == MAPPINGFORMAT_PAIRS) {
    GenerateCustomRidRanks(mapping_parameters_.pairs_custom_rid_order_path,
                           num_reference_sequences, reference,
                           pairs_custom_rid_rank_);
    GenerateCustomRidRanks(
        mapping_parameters_.pairs_flipping_custom_rid_order_file_path,
        num_reference_sequences, reference, pairs_custom_rid_rank_);
  }

  // Load index
@@ -844,7 +844,8 @@ void Chromap::MapPairedEndReads() {
                  thread_num_candidates +=
                      current_num_candidates1 + current_num_candidates2;

                  if (mapping_parameters_.custom_rid_order_path.length() > 0) {
                  if (mapping_parameters_.custom_rid_order_file_path.length() >
                      0) {
                    RerankCandidatesRid(
                        paired_end_mapping_metadata.mapping_metadata1_
                            .positive_candidates_);
+2 −2
Original line number Diff line number Diff line
@@ -411,12 +411,12 @@ void ChromapDriver::ParseArgsAndRun(int argc, char *argv[]) {
    }

    if (result.count("chr-order")) {
      mapping_parameters.custom_rid_order_path =
      mapping_parameters.custom_rid_order_file_path =
          result["chr-order"].as<std::string>();
    }

    if (result.count("pairs-natural-chr-order")) {
      mapping_parameters.pairs_custom_rid_order_path =
      mapping_parameters.pairs_flipping_custom_rid_order_file_path =
          result["pairs-natural-chr-order"].as<std::string>();
    }

+2 −2
Original line number Diff line number Diff line
@@ -59,9 +59,9 @@ struct MappingParameters {
  std::string mapping_output_file_path;
  std::string matrix_output_prefix;
  // The order for general sorting.
  std::string custom_rid_order_path;
  std::string custom_rid_order_file_path;
  // The order for pairs format flipping.
  std::string pairs_custom_rid_order_path;
  std::string pairs_flipping_custom_rid_order_file_path;
  std::string barcode_translate_table_file_path;
  bool skip_barcode_check = false;