allele_diff_indices_parallel2 | R Documentation |
This function compares germline sequences (germs
) and input sequences (inputs
)
and identifies single nucleotide polymorphisms (SNPs) or their counts, with optional parallel execution.
The comparison ignores specified non-mismatch characters (e.g., gaps or ambiguous bases).
allele_diff_indices_parallel2(
germs,
inputs,
X = 0L,
parallel = FALSE,
return_count = FALSE,
non_mismatch_chars_nullable = NULL
)
germs |
A vector of strings representing germline sequences. |
inputs |
A vector of strings representing input sequences. |
X |
The threshold index from which to return SNP indices or counts (default: 0). |
parallel |
A boolean flag to enable parallel processing (default: FALSE). |
return_count |
A boolean flag to return the count of mutations instead of their indices (default: FALSE). |
non_mismatch_chars_nullable |
A set of characters that are ignored when comparing sequences (default: 'N', '.', '-'). |
A list of integer vectors (if return_count = FALSE
) or a vector of integers (if return_count = TRUE
).
# Example usage
germs <- c("ATCG", "ATCC")
inputs <- c("ATTG", "ATTA")
X <- 0
# Return indices of SNPs
result_indices <- allele_diff_indices_parallel2(germs, inputs, X,
parallel = TRUE, return_count = FALSE)
print(result_indices) # list(c(4), c(3, 4))
# Return counts of SNPs
result_counts <- allele_diff_indices_parallel2(germs, inputs, X,
parallel = FALSE, return_count = TRUE)
print(result_counts) # c(1, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.