Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# BIGr (development version)

- Fixed `madc2vcf_all()` error "invalid substring arguments" that occurred with `add_others = TRUE` when an off-target ("Other") allele aligned to the reference with no mismatch positions remaining after the target SNP position was removed. The reference/alternate base lookups for off-target alleles are now guarded by the existing non-empty check, matching how the off-target Match alleles are already handled.

# BIGr 0.7.2

- Fixed manual text errors
Expand Down
5 changes: 3 additions & 2 deletions R/madc2vcf_all.R
Original file line number Diff line number Diff line change
Expand Up @@ -652,10 +652,11 @@ compare <- function(one_tag, botloci, alignment_score_thr = 40, mi_df = NULL, ad
pos_alt_idx <- pos_alt_idx[-rm_target_other]
}
}
other_ref_base <- substring(ref_seq, pos_ref_idx, pos_ref_idx)
other_alt_base <- substring(others_seq[j,]$AlleleSequence, pos_alt_idx, pos_alt_idx)
# Cases found where the AltMatch is another alternative for the target SNP - they are discarted
if(length(pos_ref_idx) >0){
# Compute bases only when mismatch positions remain; substring() errors on integer(0) indices
other_ref_base <- substring(ref_seq, pos_ref_idx, pos_ref_idx)
other_alt_base <- substring(others_seq[j,]$AlleleSequence, pos_alt_idx, pos_alt_idx)
# If Match sequences have N, do not consider as polymorphism
if(any(!other_alt_base %in% c("A", "T", "C", "G"))) {
other_ref_base <- other_ref_base[-which(!other_alt_base %in% c("A", "T", "C", "G"))]
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ BIGr is an R package developed by [Breeding Insight](https://breedinginsight.org

## Installation

To install BIGr, you'll need to have `BiocManager` installed.
The stable version of BIGr is now available on CRAN. To install from the R terminal:
```R
install.packages("BIGr")
```


To install the development version of BIGr, you'll need to have `BiocManager` installed. Then, install from GitHub.
```R
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
Expand All @@ -31,9 +36,11 @@ if (!require("BiocManager", quietly = TRUE))
BiocManager::install("Breeding-Insight/BIGr", dependencies = TRUE)
library(BIGr)
```
> Note: This GitHub version of BIGr is in development. So, there could be bugs present, and the stable version of BIGr on CRAN should be viewed as more reliable.

## Funding

BIGr development is supported by [Breeding Insight](https://breedinginsight.org/), a USDA-funded initiative based at Cornell University.
BIGr development is supported by [Breeding Insight](https://breedinginsight.org/), a USDA-funded initiative based at the University of Florida - IFAS.

## Citation

Expand Down