diff --git a/DESCRIPTION b/DESCRIPTION index 0bc9306..c821f71 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: miplicorn -Title: A Framework for MIP and Amplicon Analysis +Title: A Framework for Molecular Inversion Probe and Amplicon Analysis Version: 0.2.1.9000 Authors@R: person("Aris", "Paschalidis", , "aris.paschalidis@gmail.com", role = c("aut", "cre"), diff --git a/README.Rmd b/README.Rmd index 85660d1..0d6525b 100644 --- a/README.Rmd +++ b/README.Rmd @@ -54,14 +54,13 @@ demonstration of several features of the package. library(miplicorn) ref_file <- miplicorn_example("reference_AA_table.csv") -alt_file <- miplicorn_example("reference_AA_table.csv") -cov_file <- miplicorn_example("reference_AA_table.csv") +alt_file <- miplicorn_example("alternate_AA_table.csv") +cov_file <- miplicorn_example("coverage_AA_table.csv") data <- read_tbl_ref_alt_cov(ref_file, alt_file, cov_file, gene == "atp6" | gene == "crt") data -filter_coverage(data, 100) -filter_targeted(data, "Yes") +plot_coverage(data, mutation_name) prev <- mutation_prevalence(data, threshold = 5) prev diff --git a/README.md b/README.md index 7270368..15866c1 100644 --- a/README.md +++ b/README.md @@ -51,58 +51,45 @@ demonstration of several features of the package. library(miplicorn) ref_file <- miplicorn_example("reference_AA_table.csv") -alt_file <- miplicorn_example("reference_AA_table.csv") -cov_file <- miplicorn_example("reference_AA_table.csv") +alt_file <- miplicorn_example("alternate_AA_table.csv") +cov_file <- miplicorn_example("coverage_AA_table.csv") data <- read_tbl_ref_alt_cov(ref_file, alt_file, cov_file, gene == "atp6" | gene == "crt") data -#> # A tibble: 832 × 10 -#> sample gene_id gene mutation_name exonic_func aa_change targeted -#> -#> 1 D10-JJJ-23 PF3D7_0106300 atp6 atp6-Ala623Glu missense_var… Ala623Glu Yes -#> 2 D10-JJJ-43 PF3D7_0106300 atp6 atp6-Ala623Glu missense_var… Ala623Glu Yes -#> 3 D10-JJJ-55 PF3D7_0106300 atp6 atp6-Ala623Glu missense_var… Ala623Glu Yes -#> 4 D10-JJJ-5 PF3D7_0106300 atp6 atp6-Ala623Glu missense_var… Ala623Glu Yes -#> 5 D10-JJJ-47 PF3D7_0106300 atp6 atp6-Ala623Glu missense_var… Ala623Glu Yes -#> # … with 827 more rows, and 3 more variables: ref_umi_count , -#> # alt_umi_count , coverage - -filter_coverage(data, 100) -#> # A tibble: 236 × 10 -#> sample gene_id gene mutation_name exonic_func aa_change targeted -#> -#> 1 D10-JJJ-23 PF3D7_0106300 atp6 atp6-Ala623Glu missense_var… Ala623Glu Yes -#> 2 D10-JJJ-55 PF3D7_0106300 atp6 atp6-Ala623Glu missense_var… Ala623Glu Yes -#> 3 D10-JJJ-15 PF3D7_0106300 atp6 atp6-Ala623Glu missense_var… Ala623Glu Yes -#> 4 D10-JJJ-52 PF3D7_0106300 atp6 atp6-Ala623Glu missense_var… Ala623Glu Yes -#> 5 D10-JJJ-38 PF3D7_0106300 atp6 atp6-Ala623Glu missense_var… Ala623Glu Yes -#> # … with 231 more rows, and 3 more variables: ref_umi_count , -#> # alt_umi_count , coverage -filter_targeted(data, "Yes") -#> # A tibble: 624 × 10 -#> sample gene_id gene mutation_name exonic_func aa_change targeted -#> -#> 1 D10-JJJ-23 PF3D7_0106300 atp6 atp6-Ala623Glu missense_var… Ala623Glu Yes -#> 2 D10-JJJ-43 PF3D7_0106300 atp6 atp6-Ala623Glu missense_var… Ala623Glu Yes -#> 3 D10-JJJ-55 PF3D7_0106300 atp6 atp6-Ala623Glu missense_var… Ala623Glu Yes -#> 4 D10-JJJ-5 PF3D7_0106300 atp6 atp6-Ala623Glu missense_var… Ala623Glu Yes -#> 5 D10-JJJ-47 PF3D7_0106300 atp6 atp6-Ala623Glu missense_var… Ala623Glu Yes -#> # … with 619 more rows, and 3 more variables: ref_umi_count , -#> # alt_umi_count , coverage +#> # A ref alt cov table: 832 × 10 +#> sample gene_id gene mutat…¹ exoni…² aa_ch…³ targe…⁴ ref_u…⁵ alt_u…⁶ cover…⁷ +#> +#> 1 D10-JJJ… PF3D7_… atp6 atp6-A… missen… Ala623… Yes 608 0 608 +#> 2 D10-JJJ… PF3D7_… atp6 atp6-A… missen… Ala623… Yes 20 0 20 +#> 3 D10-JJJ… PF3D7_… atp6 atp6-A… missen… Ala623… Yes 158 0 158 +#> 4 D10-JJJ… PF3D7_… atp6 atp6-A… missen… Ala623… Yes 2 0 2 +#> 5 D10-JJJ… PF3D7_… atp6 atp6-A… missen… Ala623… Yes 1 0 1 +#> # … with 827 more rows, and abbreviated variable names ¹​mutation_name, +#> # ²​exonic_func, ³​aa_change, ⁴​targeted, ⁵​ref_umi_count, ⁶​alt_umi_count, +#> # ⁷​coverage +#> # ℹ Use `print(n = ...)` to see more rows + +plot_coverage(data, mutation_name) +``` + + + +```r prev <- mutation_prevalence(data, threshold = 5) prev #> # A tibble: 16 × 4 #> mutation_name n_total n_mutant prevalence #> -#> 1 atp6-Ala623Glu 36 36 1 -#> 2 atp6-Glu431Lys 39 39 1 -#> 3 atp6-Gly639Asp 26 26 1 -#> 4 atp6-Ser466Asn 15 15 1 -#> 5 atp6-Ser769Asn 17 17 1 +#> 1 atp6-Ala623Glu 36 0 0 +#> 2 atp6-Glu431Lys 39 0 0 +#> 3 atp6-Gly639Asp 26 19 0.731 +#> 4 atp6-Ser466Asn 15 9 0.6 +#> 5 atp6-Ser769Asn 17 0 0 #> # … with 11 more rows +#> # ℹ Use `print(n = ...)` to see more rows plot(prev) ``` - + diff --git a/man/figures/README-usage-1.png b/man/figures/README-usage-1.png index d1efd31..1c49276 100644 Binary files a/man/figures/README-usage-1.png and b/man/figures/README-usage-1.png differ diff --git a/man/figures/README-usage-2.png b/man/figures/README-usage-2.png new file mode 100644 index 0000000..6af7db0 Binary files /dev/null and b/man/figures/README-usage-2.png differ