-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'issue-24' into develop
* issue-24: Increment version number to 0.0.0.9029 Disabled FASTA tests on greedyMix() (#24) Added synthetic FASTA file (#24) Ensure diffInCounts returns as.matrix (#24) Adapted tests to FASTA on greedyMix() (#24) Removed baps file pointing to fasta Improved conversion from FASTA to BAPS (#24) Improved handling of FASTA data (#24) `process_BAPS_data()` can handle file being an R object Added function to convert from FASTA to BAPS (#24) Unwrapped `greedyMix() example (#24)
- Loading branch information
Showing
11 changed files
with
109 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#' @title Convert from FASTA to BAPS | ||
#' @description Converts a file (not an R object) from FASTA to BAPS format | ||
#' @param file filename of FASTA file | ||
#' @return `data` in BAPS format | ||
#' @author Waldir Leoncio | ||
#' @export | ||
#' @examples | ||
#' file <- system.file("extdata", "FASTA_clustering_haploid.fasta", package = "rBAPS") | ||
#' convert_FASTA_to_BAPS(file) | ||
convert_FASTA_to_BAPS <- function(file) { | ||
data <- load_fasta(file) # Processing data | ||
data <- cbind(data, seq_len(nrow(data))) # Add IDs of individuals (sequential) | ||
data[data == 0] <- -9 # Because zeros (missing) in BAPS are coded as -9 | ||
colnames(data) <- paste("V", seq_len(ncol(data)), sep = "") | ||
return(data) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
>1 | ||
AACGAAACGATCGCGTCACCGGAACGTTGTCCGTCTCGAATAGCACTGTGGGAACGTGTTTTACATTCGT | ||
TAGTAACATGGTCAGCTGCTCATCCGTATT | ||
|
||
>2 | ||
ATCAGCAAACGAGAAGTTGCAGAGGTCTTTGGTTTGAGCATTGCCCCCATACAATCGACTTCTGGCCTGG | ||
AATGCACCACAAACATACCCCACAGGCTCG | ||
|
||
>3 | ||
GCTTTTACTAAGGCCTATCGGATTCAACGTCACTAAGACTCGGCACTAACAGGCCGTTGTAAGCCGCTCT | ||
GTCTGAGTATGGATGGTGGAGGCGGAGCCG | ||
|
||
>4 | ||
ACCTGGACCTCTGTATTAACGGCTGTGATTCTGAGGGGGGTATCGCAGCGCACTTTCTAGCTATATCACG | ||
CAAGGATAAAGTTCACCCATCACGTTGACC | ||
|
||
>5 | ||
ACAATACGTCATCCACACCGCGCCTATGGAAGAATTTGCCCTTTCGGCGACAGCCCATGCTGTCAAGGAG | ||
GTAACATAGCTACCAGGTCCCATTCCAGGA | ||
|
||
>6 | ||
TCCCCCCAGTGGACACGGCTCGGGTAATGCAGCTTACCTCAACGCTAACGCATTTGACAGTAGTGAATCA | ||
CGGGCAACGCTGGGTGATTGCAAGTTTTGT | ||
|
||
>7 | ||
GCAACCACTGGTCGCCTGGAGCATTGATCAGGAACATGTCTGCAAGGGGGGCCGTTGCGGGTTTCAGTCA | ||
TCGTATTGCGCTGCAAATCCTCGGAGCCTC | ||
|
||
>8 | ||
CACCCGTAAAGCACGAGTAGGTTTCACCGCGACTTATATATTCCACCATACGGTTAACAAGGCAACACTT | ||
ATTCGTCGTCCAATGATCGTCCCTCTCCAG | ||
|
||
>9 | ||
CGAATCCATTCGGGATAAAGTTAATACGTAAGTCGAACGGGGTTTAGGAAGAGCTCTGCTGTTAAGCGCG | ||
CTTATCATCTTATATGTGTCAGTTGTGTAC | ||
|
||
>10 | ||
CGTTCGCATTTATAGGATATCCCCTAAACTAATTGGTAGTGATGGTATACCAGCGGTGCATTGTCCTCGC | ||
CTGTAGTTTAAGTCAACCTCTGCCTTAATC |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters