Skip to content

Commit

Permalink
update docu
Browse files Browse the repository at this point in the history
  • Loading branch information
HajkD committed Dec 21, 2019
1 parent 9966a88 commit 5d9c26f
Show file tree
Hide file tree
Showing 46 changed files with 373 additions and 158 deletions.
2 changes: 1 addition & 1 deletion R/divergence_stratigraphy.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
#'
#' @return A data.table storing the divergence map of the query organism.
#' @seealso \code{\link{dNdS}}, \code{\link{divergence_map}}, \code{\link{substitutionrate}}, \code{\link{multi_aln}},
#' \code{\link{codon_aln}}, \code{\link{blast_best}}, \code{\link{blast_rec}}, \code{\link{map.generator}}
#' \code{\link{codon_aln}}, \code{\link{blast_best}}, \code{\link{blast_rec}}, \code{\link{map_generator_dnds}}
#' @export
divergence_stratigraphy <- function(query_file,
subject_file,
Expand Down
4 changes: 4 additions & 0 deletions R/filter_core_set.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#' @title Helper function to extract a core set of orthologous gene loci
#' @description Helper function to extract a core set of orthologous gene loci
#' @param x input data in \code{data.frame} or \code{tibble} format.
#' @param order_species a character vector containing the scientific names of the organisms of interest
#' ordered according to their phylogenetic distance to their reference species.
filter_core_set <- function(x, order_species) {

subset_species <- sort(as.character(names(table(
Expand Down
4 changes: 4 additions & 0 deletions R/filter_core_set_lnc.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#' @title Helper function to extract a core set of orthologous lncRNAs
#' @description Helper function to extract a core set of orthologous lncRNAs.
#' @param x input data in \code{data.frame} or \code{tibble} format.
#' @param order_species a character vector containing the scientific names of the organisms of interest
#' ordered according to their phylogenetic distance to their reference species.
filter_core_set_lnc <- function(x, order_species) {

subset_species <- sort(as.character(names(table(
Expand Down
2 changes: 1 addition & 1 deletion R/lnc_map_core_orthologs.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' @title Retrieve a core set of orthologous lncRNAs from the pairwise lncRNA orthologs map
#' @description Given a lnc_map table generated with \code{\link{map_generator_lnc}},
#' this function will determine a core set of lncRNA orthologs that are shared between all species.
#' @param ortho_tables a \code{lnc_map} that was generated with \code{\link{map_generator_lnc}}.
#' @param lnc_map a \code{lnc_map} that was generated with \code{\link{map_generator_lnc}}.
#' @param species_order a character string specifying species names listed in the order of phylogenetic/taxonomic distance from the query species.
#' The species names must match with the species names present in the \code{lnc_map}.
#' @author Hajk-Georg Drost
Expand Down
10 changes: 0 additions & 10 deletions R/orthologs.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,8 @@
#' @author Hajk-Georg Drost
#' @return A data.table storing the query_ids of orthologous genes in the first column, the subject_ids of orthologous genes
#' in the second column and the amino acid sequences in the third column.
#' @references
#'
#' BLAST: http://blast.ncbi.nlm.nih.gov/blastcgihelp.shtml
#'
#' ProteinOrtho: https://www.bioinf.uni-leipzig.de/Software/proteinortho/
#'
#' @examples \dontrun{
#'
#'
#' ### BLAST Best Hit
#'
#' # perform orthology inference using BLAST best hit
Expand All @@ -79,9 +72,6 @@
#' seq_type = "protein",
#' ortho_detection = "RBH",
#' comp_cores = 2)
#'
#'
#'
#' }
#' @seealso \code{\link{blast_rec}}, \code{\link{dNdS}}
#' @export
Expand Down
4 changes: 2 additions & 2 deletions R/promotor_divergence_estimation.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#' @title Estimate the DNA distance between promotor sequences
#' @description Given two \code{fasta} files storing the promotor sequence
#' of protein coding genes, this function estimates the pairwise DNA distance between these promotor sequences.
#' @param query file path to a query \code{fasta} file storing promotor sequences of interest (e.g. generated with \code{\link[metablastr]{extract_promotor_seqs_from_genome}}).
#' @param subject file path to a subject \code{fasta} file storing promotor sequences of interest (e.g. generated with \code{\link[metablastr]{extract_promotor_seqs_from_genome}}).
#' @param query file path to a query \code{fasta} file storing promotor sequences of interest (e.g. generated with \code{\link[metablastr]{extract_upstream_promotor_seqs}}).
#' @param subject file path to a subject \code{fasta} file storing promotor sequences of interest (e.g. generated with \code{\link[metablastr]{extract_upstream_promotor_seqs}}).
#' @param model a model as specified in \code{\link[ape]{dist.dna}}: a character string specifying the evolutionary model to be used - must be one of:
#' \itemize{
#' \item \code{K80} (the default)
Expand Down
14 changes: 7 additions & 7 deletions R/promotor_divergence_of_orthologous_genes.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' from a set of pairwise species comparisons. It allows to add this promotor divergence information
#' to an pre-computed \code{dNdS table} generated with \code{\link{dNdS}} or \code{\link{generate_ortholog_tables_all}}.
#' @param promotor_folder a path to a folder containing promotor sequences in \code{fasta} format that
#' were generated with \code{\link[metablastr]{extract_promotor_seqs_from_genome}}.
#' were generated with \code{\link[metablastr]{extract_upstream_promotor_seqs}}.
#' @param ortholog_tables_folder a path to a folder containing dNdS tables generated with \code{\link{generate_ortholog_tables_all}}
#' @param model a model as specified in \code{\link[ape]{dist.dna}}: a character string specifying the evolutionary model to be used - must be one of:
#' \itemize{
Expand Down Expand Up @@ -158,7 +158,7 @@ promotor_divergence_of_orthologous_genes <-
unlist(stringr::str_split(x, "_"))[1]))

qry_matched_genes <-
promotor_file_qry_sequences@ranges@NAMES[na.omit(
promotor_file_qry_sequences@ranges@NAMES[stats::na.omit(
match(
species_specific_ortholog_tables$query_gene_locus_id,
promotor_file_qry_sequences@ranges@NAMES
Expand Down Expand Up @@ -198,7 +198,7 @@ promotor_divergence_of_orthologous_genes <-
))

sbj_matched_genes <-
promotor_file_sbj_sequences@ranges@NAMES[na.omit(
promotor_file_sbj_sequences@ranges@NAMES[stats::na.omit(
match(
species_specific_ortholog_tables$subject_gene_locus_id,
promotor_file_sbj_sequences@ranges@NAMES
Expand Down Expand Up @@ -244,28 +244,28 @@ promotor_divergence_of_orthologous_genes <-
" orthologous genes were retained."
)

Biostrings::writeXStringSet(promotor_file_qry_sequences[na.omit(
Biostrings::writeXStringSet(promotor_file_qry_sequences[stats::na.omit(
match(
species_specific_ortholog_tables_subset$query_gene_locus_id,
promotor_file_qry_sequences@ranges@NAMES
)
)], qry_output_file_path)

Biostrings::writeXStringSet(promotor_file_sbj_sequences[na.omit(
Biostrings::writeXStringSet(promotor_file_sbj_sequences[stats::na.omit(
match(
species_specific_ortholog_tables_subset$subject_gene_locus_id,
promotor_file_sbj_sequences@ranges@NAMES
)
)], sbj_output_file_path)
} else {
Biostrings::writeXStringSet(promotor_file_qry_sequences[na.omit(
Biostrings::writeXStringSet(promotor_file_qry_sequences[stats::na.omit(
match(
species_specific_ortholog_tables$query_gene_locus_id,
promotor_file_qry_sequences@ranges@NAMES
)
)], qry_output_file_path)

Biostrings::writeXStringSet(promotor_file_sbj_sequences[na.omit(
Biostrings::writeXStringSet(promotor_file_sbj_sequences[stats::na.omit(
match(
species_specific_ortholog_tables$subject_gene_locus_id,
promotor_file_sbj_sequences@ranges@NAMES
Expand Down
2 changes: 1 addition & 1 deletion R/set_blast.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#' # running the set function to see an example output
#' head(set_blast(file = system.file('seqs/ortho_thal_cds.fasta', package = 'orthologr'))[[1]] , 2)
#' }
#' @seealso \code{\link{blast_best}}, \code{\link{blast_rec}}, \code{\link{advanced_blast}}, \code{\link{blast}}, \code{\link{advanced_makedb}}
#' @seealso \code{\link{blast_best}}, \code{\link{blast_rec}}, \code{\link{blast}}
#' @import data.table
#' @export

Expand Down
6 changes: 5 additions & 1 deletion R/testCoreOrthoParamsGeneLocus.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#' @title Helper function for plot_diverse_homology_thresholds_core_orthologs
#' @title Helper function for \code{plot_diverse_homology_thresholds_core_orthologs}
#' @description Helper function for \code{\link{plot_diverse_homology_thresholds_core_orthologs}}.
#' @param ortho_tables a \code{ortho tables} that was generated with \code{\link{generate_ortholog_tables_all}}.
#' @param param parameters.
#' @param species_order a character string specifying species names listed in the order of phylogenetic/taxonomic distance from the query species.
testCoreOrthoParamsGeneLocus <-
function(ortho_tables, param, species_order) {
ortho_tables_core <-
Expand Down
8 changes: 7 additions & 1 deletion R/testCoreOrthoParamsSplicceVariant.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#' @title Helper function for plot_diverse_homology_thresholds_core_orthologs 2
#' @title Helper function for splice variant based \code{plot_diverse_homology_thresholds_core_orthologs}
#' @description Helper function for splice variant based \code{\link{plot_diverse_homology_thresholds_core_orthologs}}.
#' @param ortho_tables a \code{ortho tables} that was generated with \code{\link{generate_ortholog_tables_all}}.
#' @param param parameters.
#' @param species_order a character string specifying species names listed in the order of phylogenetic/taxonomic distance from the query species.
#' @param n_core_species number of core species.

testCoreOrthoParamsSpliceVariant <-
function(ortho_tables,
param,
Expand Down
2 changes: 1 addition & 1 deletion R/translate_cds_to_protein.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' shall be stored as \code{fasta} file.
#' @param delete_corrupt_cds delete_corrupt_cds a logical value indicating whether sequences with corrupt base triplets should be removed from the input \code{file}. This is the case when the length of coding sequences cannot be divided by 3 and thus the coding sequence contains at least one corrupt base triplet.
#' @author Hajk-Georg Drost
#' @examples dontrun{
#' @examples \dontrun{
#' # install.packages("biomartr")
#' # download coding sequences of Arabidopsis thaliana
#' Ath_file_path <- biomartr::getCDS(db = "refseq",
Expand Down
2 changes: 1 addition & 1 deletion R/translate_cds_to_protein_all.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' @param output_folder name or file path to a folder that that shall be generated to store the output \code{fasta} files.
#' @param delete_corrupt_cds delete_corrupt_cds a logical value indicating whether sequences with corrupt base triplets should be removed from the input \code{file}. This is the case when the length of coding sequences cannot be divided by 3 and thus the coding sequence contains at least one corrupt base triplet.
#' @author Hajk-Georg Drost
#' @examples dontrun{
#' @examples \dontrun{
#' # install.packages("biomartr")
#' # download coding sequences of Arabidopsis thaliana, Arabidopsis lyrata, and Capsella rubella
#' org_list <- c("Arabidopsis thaliana", "Arabidopsis lyrata", "Capsella rubella")
Expand Down
26 changes: 18 additions & 8 deletions man/blast.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 16 additions & 6 deletions man/blast_best.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 16 additions & 6 deletions man/blast_rec.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions man/codon_aln.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 14 additions & 5 deletions man/compute_dnds.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 25 additions & 8 deletions man/dNdS.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5d9c26f

Please sign in to comment.