Last updated: 2023-04-13

Checks: 5 2

Knit directory: Serreze-T1D_Workflow/

This reproducible R Markdown analysis was created with workflowr (version 1.7.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


The R Markdown is untracked by Git. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20220210) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Using absolute paths to the files within your workflowr project makes it difficult for you and others to run your code on a different machine. Change the absolute path(s) below to the suggested relative path(s) to make your code more reproducible.

absolute relative
/Users/corneb/Documents/MyJax/CS/Projects/Serreze/qc/workflowr/Serreze-T1D_Workflow .

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 51e3845. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .DS_Store
    Ignored:    analysis/.DS_Store

Untracked files:
    Untracked:  analysis/0.1.1_preparing.data_bqc_7.batches_myo.R
    Untracked:  analysis/0.1.1_preparing.data_bqc_7.batches_myo.Rmd
    Untracked:  analysis/0.1_samples_batch_20230124.Rmd
    Untracked:  analysis/0.1_samples_batch_20230225.Rmd
    Untracked:  analysis/0.1_samples_batch_20230313.Rmd
    Untracked:  analysis/0.2_haplotype_comparison_bqc_7.batches_myo_minprob.R
    Untracked:  analysis/0.2_haplotype_comparison_bqc_7.batches_myo_minprob.Rmd
    Untracked:  analysis/2.1_sample_bqc_7.batches_myo.R
    Untracked:  analysis/2.1_sample_bqc_7.batches_myo.Rmd
    Untracked:  analysis/2.1_sample_bqc_7.batches_myo.Rmd.R
    Untracked:  analysis/2.2.1_snp_qc_7.batches_myo.R
    Untracked:  analysis/2.2.1_snp_qc_7.batches_myo.Rmd
    Untracked:  analysis/2.2.1_snp_qc_7.batches_myo_mis.R
    Untracked:  analysis/2.2.1_snp_qc_7.batches_myo_mis.Rmd
    Untracked:  analysis/2.4_preparing.data_aqc_7.batches_myo.Rmd
    Untracked:  analysis/2.4_preparing.data_aqc_7.batches_myo_mis.Rmd
    Untracked:  analysis/2.4_preparing.data_aqc_7.batches_myo_misd.R
    Untracked:  analysis/3.1_phenotype.qc_corrected_7.batches_myo.Rmd
    Untracked:  analysis/3.1_phenotype.qc_corrected_7.batches_myo_mis.Rmd
    Untracked:  analysis/4.1.1_qtl.analysis_binary_het-ici-myo-yes.vs.het-ici-myo-no_snpsqc_dis_no-x_updated_7.batches_myo.R
    Untracked:  analysis/4.1.1_qtl.analysis_binary_het-ici-myo-yes.vs.het-ici-myo-no_snpsqc_dis_no-x_updated_7.batches_myo.Rmd
    Untracked:  analysis/4.1.1_qtl.analysis_binary_het-ici-myo-yes.vs.het-ici-myo-no_snpsqc_dis_no-x_updated_7.batches_myo_mis.Rmd
    Untracked:  analysis/4.1.1_qtl.analysis_binary_het-ici.vs.het-pbs_snpsqc_dis_no-x_updated_7.batches_myo.R
    Untracked:  analysis/4.1.1_qtl.analysis_binary_het-ici.vs.het-pbs_snpsqc_dis_no-x_updated_7.batches_myo.Rmd
    Untracked:  analysis/4.1.1_qtl.analysis_binary_het-ici.vs.het-pbs_snpsqc_dis_no-x_updated_7.batches_myo_mis.Rmd
    Untracked:  analysis/4.1.1_qtl.analysis_binary_ici-myo-yes.vs.ici-myo-no_snpsqc_dis_no-x_updated_7.batches_myo.R
    Untracked:  analysis/4.1.1_qtl.analysis_binary_ici-myo-yes.vs.ici-myo-no_snpsqc_dis_no-x_updated_7.batches_myo.Rmd
    Untracked:  analysis/4.1.1_qtl.analysis_binary_ici-myo-yes.vs.ici-myo-no_snpsqc_dis_no-x_updated_7.batches_myo_mis.Rmd
    Untracked:  analysis/4.1.1_qtl.analysis_binary_ici-sick.vs.ici-eoi_snpsqc_dis_no-x_updated_7.batches_myo.R
    Untracked:  analysis/4.1.1_qtl.analysis_binary_ici-sick.vs.ici-eoi_snpsqc_dis_no-x_updated_7.batches_myo.Rmd
    Untracked:  analysis/4.1.1_qtl.analysis_binary_ici-sick.vs.ici-eoi_snpsqc_dis_no-x_updated_7.batches_myo_mis.Rmd
    Untracked:  analysis/4.1.1_qtl.analysis_binary_ici.vs.pbs_snpsqc_dis_no-x_updated_7.batches_myo.R
    Untracked:  analysis/4.1.1_qtl.analysis_binary_ici.vs.pbs_snpsqc_dis_no-x_updated_7.batches_myo.Rmd
    Untracked:  analysis/4.1.1_qtl.analysis_binary_ici.vs.pbs_snpsqc_dis_no-x_updated_7.batches_myo_mis.Rmd
    Untracked:  analysis/4.1.1_qtl.analysis_binary_myo-yes.vs.myo-no_snpsqc_dis_no-x_updated_7.batches_myo.R
    Untracked:  analysis/4.1.1_qtl.analysis_binary_myo-yes.vs.myo-no_snpsqc_dis_no-x_updated_7.batches_myo.Rmd
    Untracked:  analysis/4.1.1_qtl.analysis_binary_myo-yes.vs.myo-no_snpsqc_dis_no-x_updated_7.batches_myo_mis.Rmd
    Untracked:  analysis/4.1.1_qtl.analysis_binary_pbs-myo-yes.vs.pbs-myo-no_snpsqc_dis_no-x_updated_7.batches_myo.R
    Untracked:  analysis/4.1.1_qtl.analysis_binary_pbs-myo-yes.vs.pbs-myo-no_snpsqc_dis_no-x_updated_7.batches_myo.Rmd
    Untracked:  analysis/4.1.1_qtl.analysis_binary_pbs-myo-yes.vs.pbs-myo-no_snpsqc_dis_no-x_updated_7.batches_myo_mis.Rmd
    Untracked:  analysis/debugging_comparing_old_Rmd/
    Untracked:  analysis/genotype.frequencies_het-ici-myo-yes.vs.het-ici-myo-no_7.batches_myo.Rmd
    Untracked:  analysis/genotype.frequencies_het-ici-myo-yes.vs.het-ici-myo-no_7.batches_myo_mis.Rmd
    Untracked:  analysis/genotype.frequencies_het-ici.vs.het-pbs_7.batches_myo.Rmd
    Untracked:  analysis/genotype.frequencies_het-ici.vs.het-pbs_7.batches_myo_mis.Rmd
    Untracked:  analysis/genotype.frequencies_ici-myo-yes.vs.ici-myo-no_7.batches_myo.Rmd
    Untracked:  analysis/genotype.frequencies_ici-myo-yes.vs.ici-myo-no_7.batches_myo_mis.Rmd
    Untracked:  analysis/genotype.frequencies_ici-sick.vs.ici-eoi_7.batches_myo.Rmd
    Untracked:  analysis/genotype.frequencies_ici-sick.vs.ici-eoi_7.batches_myo_mis.Rmd
    Untracked:  analysis/genotype.frequencies_ici.vs.pbs_7.batches_myo.Rmd
    Untracked:  analysis/genotype.frequencies_ici.vs.pbs_7.batches_myo_mis.Rmd
    Untracked:  analysis/genotype.frequencies_myo-yes.vs.myo-no_7.batches_myo.Rmd
    Untracked:  analysis/genotype.frequencies_myo-yes.vs.myo-no_7.batches_myo_mis.Rmd
    Untracked:  analysis/genotype.frequencies_pbs-myo-yes.vs.pbs-myo-no_7.batches_myo.Rmd
    Untracked:  analysis/genotype.frequencies_pbs-myo-yes.vs.pbs-myo-no_7.batches_myo_mis.Rmd
    Untracked:  analysis/index_7.batches_myo.Rmd
    Untracked:  analysis/power.analysis_het-ici-myo-yes.vs.het-ici-myo-no_7.batches_myo.Rmd
    Untracked:  analysis/power.analysis_het-ici-myo-yes.vs.het-ici-myo-no_7.batches_myo_mis.Rmd
    Untracked:  analysis/power.analysis_het-ici.vs.het-pbs_7.batches_myo.Rmd
    Untracked:  analysis/power.analysis_het-ici.vs.het-pbs_7.batches_myo_mis.Rmd
    Untracked:  analysis/power.analysis_ici-myo-yes.vs.ici-myo-no_7.batches_myo.Rmd
    Untracked:  analysis/power.analysis_ici-myo-yes.vs.ici-myo-no_7.batches_myo_mis.Rmd
    Untracked:  analysis/power.analysis_ici-sick.vs.ici-eoi_7.batches_myo.Rmd
    Untracked:  analysis/power.analysis_ici-sick.vs.ici-eoi_7.batches_myo_mis.Rmd
    Untracked:  analysis/power.analysis_ici.vs.pbs_7.batches_myo.Rmd
    Untracked:  analysis/power.analysis_ici.vs.pbs_7batches_myo_mis.Rmd
    Untracked:  analysis/power.analysis_myo-yes.vs.myo-no_7.batches_myo.Rmd
    Untracked:  analysis/power.analysis_myo-yes.vs.myo-no_7.batches_myo_mis.Rmd
    Untracked:  analysis/power.analysis_pbs-myo-yes.vs.pbs-myo-no_7.batches_myo.Rmd
    Untracked:  analysis/power.analysis_pbs-myo-yes.vs.pbs-myo-no_7.batches_myo_mis.Rmd
    Untracked:  data/GM_covar_4.batches_myo.csv
    Untracked:  data/GM_covar_7.batches_myo.csv
    Untracked:  data/bad_markers_all_4.batches_myo.RData
    Untracked:  data/bad_markers_all_7.batches_myo.RData
    Untracked:  data/covar_corrected.cleaned_het-ici-myo-yes.vs.het-ici-myo-no_7.batches_myo.csv
    Untracked:  data/covar_corrected.cleaned_het-ici-myo-yes.vs.het-ici-myo-no_7.batches_myo_mis.csv
    Untracked:  data/covar_corrected.cleaned_het-ici.vs.het-pbs_7.batches_myo.csv
    Untracked:  data/covar_corrected.cleaned_het-ici.vs.het-pbs_7.batches_myo_mis.csv
    Untracked:  data/covar_corrected.cleaned_ici-myo-yes.vs.ici-myo-no_7.batches_myo.csv
    Untracked:  data/covar_corrected.cleaned_ici-myo-yes.vs.ici-myo-no_7.batches_myo_mis.csv
    Untracked:  data/covar_corrected.cleaned_ici-sick.vs.ici-eoi_7.batches_myo.csv
    Untracked:  data/covar_corrected.cleaned_ici-sick.vs.ici-eoi_7.batches_myo_mis.csv
    Untracked:  data/covar_corrected.cleaned_ici.vs.pbs_7.batches_myo.csv
    Untracked:  data/covar_corrected.cleaned_ici.vs.pbs_7.batches_myo_mis.csv
    Untracked:  data/covar_corrected.cleaned_myo-yes.vs.myo-no_7.batches_myo.csv
    Untracked:  data/covar_corrected.cleaned_myo-yes.vs.myo-no_7.batches_myo_mis.csv
    Untracked:  data/covar_corrected.cleaned_pbs-myo-yes.vs.pbs-myo-no_7.batches_myo.csv
    Untracked:  data/covar_corrected.cleaned_pbs-myo-yes.vs.pbs-myo-no_7.batches_myo_mis.csv
    Untracked:  data/covar_corrected_het-ici-myo-yes.vs.het-ici-myo-no_7.batches_myo.csv
    Untracked:  data/covar_corrected_het-ici-myo-yes.vs.het-ici-myo-no_7.batches_myo_mis.csv
    Untracked:  data/covar_corrected_het-ici.vs.het-pbs_7.batches_myo.csv
    Untracked:  data/covar_corrected_het-ici.vs.het-pbs_7.batches_myo_mis.csv
    Untracked:  data/covar_corrected_ici-myo-yes.vs.ici-myo-no_7.batches_myo.csv
    Untracked:  data/covar_corrected_ici-myo-yes.vs.ici-myo-no_7.batches_myo_mis.csv
    Untracked:  data/covar_corrected_ici-sick.vs.ici-eoi_7.batches_myo.csv
    Untracked:  data/covar_corrected_ici-sick.vs.ici-eoi_7.batches_myo_mis.csv
    Untracked:  data/covar_corrected_ici.vs.pbs_7.batches_myo.csv
    Untracked:  data/covar_corrected_ici.vs.pbs_7.batches_myo_mis.csv
    Untracked:  data/covar_corrected_myo-yes.vs.myo-no_7.batches_myo.csv
    Untracked:  data/covar_corrected_myo-yes.vs.myo-no_7.batches_myo_mis.csv
    Untracked:  data/covar_corrected_pbs-myo-yes.vs.pbs-myo-no_7.batches_myo.csv
    Untracked:  data/covar_corrected_pbs-myo-yes.vs.pbs-myo-no_7.batches_myo_mis.csv
    Untracked:  data/e_4.batches_myo.RData
    Untracked:  data/e_7.batches_myo.RData
    Untracked:  data/e_snpg_samqc_4.batches_myo.RData
    Untracked:  data/e_snpg_samqc_7.batches_myo.RData
    Untracked:  data/errors_ind_4.batches_myo.RData
    Untracked:  data/errors_ind_7.batches_myo.RData
    Untracked:  data/genetic_map_4.batches_myo.csv
    Untracked:  data/genetic_map_7.batches_myo.csv
    Untracked:  data/genotype_errors_marker_4.batches_myo.RData
    Untracked:  data/genotype_errors_marker_7.batches_myo.RData
    Untracked:  data/genotype_freq_marker_4.batches_myo.RData
    Untracked:  data/genotype_freq_marker_7.batches_myo.RData
    Untracked:  data/gm_allqc_4.batches_myo.RData
    Untracked:  data/gm_allqc_4.batches_myo_mis.RData
    Untracked:  data/gm_allqc_7.batches_myo.RData
    Untracked:  data/gm_allqc_7.batches_myo_mis.RData
    Untracked:  data/gm_samqc_4.batches_myo.RData
    Untracked:  data/gm_samqc_7.batches_myo.RData
    Untracked:  data/gm_serreze.BC312.RData
    Untracked:  data/gm_serreze.BC366.RData
    Untracked:  data/gm_serreze_7.batches_myo.RData
    Untracked:  data/gm_serreze_bc_7.batches_myo.RData
    Untracked:  data/het-ici-myo-yes.vs.het-ici-myo-no_marker.freq_low.geno.freq.removed_geno.ratio_7.batches_myo_mis.csv
    Untracked:  data/het-ici-myo-yes.vs.het-ici-myo-no_marker.freq_low.geno.freq.removed_sample.outliers.removed_geno.ratio_7.batches_myo_mis.csv
    Untracked:  data/het-ici-myo-yes.vs.het-ici-myo-no_marker.freq_low.probs.freq.removed_geno.ratio_7.batches_myo_mis.csv
    Untracked:  data/het-ici-myo-yes.vs.het-ici-myo-no_marker.freq_low.probs.freq.removed_sample.outliers.removed_geno.ratio_7.batches_myo_mis.csv
    Untracked:  data/het-ici-myo-yes.vs.het-ici-myo-no_sample.genos_marker.freq_low.geno.freq.removed_7.batches_myo_mis.csv
    Untracked:  data/het-ici-myo-yes.vs.het-ici-myo-no_sample.genos_marker.freq_low.geno.freq.removed_sample.outliers.removed_7.batches_myo_mis.csv
    Untracked:  data/het-ici-myo-yes.vs.het-ici-myo-no_sample.genos_marker.freq_low.probs.freq.removed_7.batches_myo_mis.csv
    Untracked:  data/het-ici-myo-yes.vs.het-ici-myo-no_sample.genos_marker.freq_low.probs.freq.removed_sample.outliers.removed_7.batches_myo_mis.csv
    Untracked:  data/het-ici.vs.het-pbs_marker.freq_low.geno.freq.removed_geno.ratio_7.batches_myo_mis.csv
    Untracked:  data/het-ici.vs.het-pbs_marker.freq_low.geno.freq.removed_sample.outliers.removed_geno.ratio_7.batches_myo_mis.csv
    Untracked:  data/het-ici.vs.het-pbs_marker.freq_low.probs.freq.removed_geno.ratio_7.batches_myo_mis.csv
    Untracked:  data/het-ici.vs.het-pbs_marker.freq_low.probs.freq.removed_sample.outliers.removed_geno.ratio_7.batches_myo_mis.csv
    Untracked:  data/het-ici.vs.het-pbs_sample.genos_marker.freq_low.geno.freq.removed_7.batches_myo_mis.csv
    Untracked:  data/het-ici.vs.het-pbs_sample.genos_marker.freq_low.geno.freq.removed_sample.outliers.removed_7.batches_myo_mis.csv
    Untracked:  data/het-ici.vs.het-pbs_sample.genos_marker.freq_low.probs.freq.removed_7.batches_myo_mis.csv
    Untracked:  data/het-ici.vs.het-pbs_sample.genos_marker.freq_low.probs.freq.removed_sample.outliers.removed_7.batches_myo_mis.csv
    Untracked:  data/ici-myo-yes.vs.ici-myo-no_marker.freq_low.geno.freq.removed_geno.ratio_7.batches_myo_mis.csv
    Untracked:  data/ici-myo-yes.vs.ici-myo-no_marker.freq_low.geno.freq.removed_sample.outliers.removed_geno.ratio_7.batches_myo_mis.csv
    Untracked:  data/ici-myo-yes.vs.ici-myo-no_marker.freq_low.probs.freq.removed_geno.ratio_7.batches_myo_mis.csv
    Untracked:  data/ici-myo-yes.vs.ici-myo-no_marker.freq_low.probs.freq.removed_sample.outliers.removed_geno.ratio_7.batches_myo_mis.csv
    Untracked:  data/ici-myo-yes.vs.ici-myo-no_sample.genos_marker.freq_low.geno.freq.removed_7.batches_myo_mis.csv
    Untracked:  data/ici-myo-yes.vs.ici-myo-no_sample.genos_marker.freq_low.geno.freq.removed_sample.outliers.removed_7.batches_myo_mis.csv
    Untracked:  data/ici-myo-yes.vs.ici-myo-no_sample.genos_marker.freq_low.probs.freq.removed_7.batches_myo_mis.csv
    Untracked:  data/ici-myo-yes.vs.ici-myo-no_sample.genos_marker.freq_low.probs.freq.removed_sample.outliers.removed_7.batches_myo_mis.csv
    Untracked:  data/myo-yes.vs.myo-no_marker.freq_low.geno.freq.removed_geno.ratio_7.batches_myo_mis.csv
    Untracked:  data/myo-yes.vs.myo-no_marker.freq_low.geno.freq.removed_sample.outliers.removed_geno.ratio_7.batches_myo_mis.csv
    Untracked:  data/myo-yes.vs.myo-no_marker.freq_low.probs.freq.removed_geno.ratio_7.batches_myo_mis.csv
    Untracked:  data/myo-yes.vs.myo-no_marker.freq_low.probs.freq.removed_sample.outliers.removed_geno.ratio_7.batches_myo_mis.csv
    Untracked:  data/myo-yes.vs.myo-no_sample.genos_marker.freq_low.geno.freq.removed_7.batches_myo_mis.csv
    Untracked:  data/myo-yes.vs.myo-no_sample.genos_marker.freq_low.geno.freq.removed_sample.outliers.removed_7.batches_myo_mis.csv
    Untracked:  data/myo-yes.vs.myo-no_sample.genos_marker.freq_low.probs.freq.removed_7.batches_myo_mis.csv
    Untracked:  data/myo-yes.vs.myo-no_sample.genos_marker.freq_low.probs.freq.removed_sample.outliers.removed_7.batches_myo_mis.csv
    Untracked:  data/pbs-myo-yes.vs.pbs-myo-no_marker.freq_low.geno.freq.removed_geno.ratio_7.batches_myo_mis.csv
    Untracked:  data/pbs-myo-yes.vs.pbs-myo-no_marker.freq_low.geno.freq.removed_sample.outliers.removed_geno.ratio_7.batches_myo_mis.csv
    Untracked:  data/pbs-myo-yes.vs.pbs-myo-no_marker.freq_low.probs.freq.removed_geno.ratio_7.batches_myo_mis.csv
    Untracked:  data/pbs-myo-yes.vs.pbs-myo-no_marker.freq_low.probs.freq.removed_sample.outliers.removed_geno.ratio_7.batches_myo_mis.csv
    Untracked:  data/pbs-myo-yes.vs.pbs-myo-no_sample.genos_marker.freq_low.geno.freq.removed_7.batches_myo_mis.csv
    Untracked:  data/pbs-myo-yes.vs.pbs-myo-no_sample.genos_marker.freq_low.geno.freq.removed_sample.outliers.removed_7.batches_myo_mis.csv
    Untracked:  data/pbs-myo-yes.vs.pbs-myo-no_sample.genos_marker.freq_low.probs.freq.removed_7.batches_myo_mis.csv
    Untracked:  data/pbs-myo-yes.vs.pbs-myo-no_sample.genos_marker.freq_low.probs.freq.removed_sample.outliers.removed_7.batches_myo_mis.csv
    Untracked:  data/percent_missing_id_4.batches_myo.RData
    Untracked:  data/percent_missing_id_7.batches_myo.RData
    Untracked:  data/percent_missing_marker_4.batches_myo.RData
    Untracked:  data/percent_missing_marker_7.batches_myo.RData
    Untracked:  data/pheno_4.batches_myo.csv
    Untracked:  data/pheno_7.batches_myo.csv
    Untracked:  data/physical_map_4.batches_myo.csv
    Untracked:  data/physical_map_7.batches_myo.csv
    Untracked:  data/probs_36state_bc_7.batches_myo.rds
    Untracked:  data/probs_8state_bc_7.batches_myo.rds
    Untracked:  data/qc_info_bad_sample_4.batches_myo.RData
    Untracked:  data/qc_info_bad_sample_7.batches_myo.RData
    Untracked:  data/sample_geno_AHB_4.batches_myo.csv
    Untracked:  data/sample_geno_AHB_7.batches_myo_orig.id.csv
    Untracked:  data/sample_geno_bc_4.batches_myo.csv
    Untracked:  data/sample_geno_bc_7.batches_myo_orig.id.csv
    Untracked:  data/serreze_probs_4.batches_myo.rds
    Untracked:  data/serreze_probs_7.batches_myo.rds
    Untracked:  data/serreze_probs_allqc_4.batches_myo.rds
    Untracked:  data/serreze_probs_allqc_4.batches_myo_mis.rds
    Untracked:  data/serreze_probs_allqc_7.batches_myo.rds
    Untracked:  data/serreze_probs_allqc_7.batches_myo_mis.rds
    Untracked:  data/summary.cg_4.batches_myo.RData
    Untracked:  data/summary.cg_7.batches_myo.RData
    Untracked:  output/Percent_missing_genotype_data_4.batches_myo.pdf
    Untracked:  output/Percent_missing_genotype_data_7.batches_myo.pdf
    Untracked:  output/Percent_missing_genotype_data_per_marker_4.batches_myo.pdf
    Untracked:  output/Percent_missing_genotype_data_per_marker_7.batches_myo.pdf
    Untracked:  output/Proportion_matching_genotypes_before_removal_of_bad_samples_4.batches_myo.pdf
    Untracked:  output/Proportion_matching_genotypes_before_removal_of_bad_samples_7.batches_myo.pdf
    Untracked:  output/genotype_error_marker_4.batches_myo.pdf
    Untracked:  output/genotype_error_marker_7.batches_myo.pdf
    Untracked:  output/genotype_frequency_marker_4.batches_myo.pdf
    Untracked:  output/genotype_frequency_marker_7.batches_myo.pdf

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


There are no past versions. Publish this analysis with wflow_publish() to start tracking its development.


Loading data

##remember to run haplotype reconstruction (pre processing) to get out sample_inventory and hdf5 file
sample_inventory <- read.csv("/Users/corneb/Documents/MyJax/CS/Projects/Serreze/haplotype.reconstruction/output_7.batches_myo/DODB_inventory_serreze_myo_7.batches_DO.csv", stringsAsFactors=FALSE, colClasses = c("character"))
hdf5_filename <- "/Users/corneb/Documents/MyJax/CS/Projects/Serreze/haplotype.reconstruction/output_7.batches_myo/hdf5_serreze_myo_7.batches_DO.h5"

##marker file
markers_v1 = read.csv("/Users/corneb/Documents/MyJax/CS/Projects/support.files/MUGAarrays/UWisc/gm_uwisc_v1.csv", as.is=T)
dim(markers_v1)
[1] 143259     13
markers_v2 = read.csv("/Users/corneb/Documents/MyJax/CS/Projects/support.files/MUGAarrays/UWisc/gm_uwisc_v2.csv", as.is=T)

markers_v1$index <- 1:nrow(markers_v1)
# Filter to retain markers with one unique position in GRCm38.
markers_v1 = subset(markers_v1, !is.na(chr) & !is.na(bp_mm10))
dim(markers_v1)
[1] 137359     14
##merging updated allele codes (from v2)
markers <- merge(markers_v1, markers_v2[c("marker","snp")], by=c("marker"), all.x=T)
names(markers)[c(7,15)] <- c("snps_v1","snps_v2")
markers <- markers[order(markers$index),]

##using only unique markers
markers_unique <- markers[markers$unique == TRUE, ]

##creating a code list for encoding markers for qtl2 (bc)
markers_1 <- markers_unique[,c("marker","chr","snps_v2")]
markers_1$A <- substr(markers_1$snps_v2, 1, 1)
markers_1$B <- substr(markers_1$snps_v2, 2, 2)
dim(markers_1)
[1] 137359      5
codes <- markers_1[,c("marker","chr","A","B")]

markers_2 <- markers_unique[markers_unique$chr %in% c(1:19, "X"), ]
markers_2$chr <- sub("^chr", "", markers_2$chr)  ###remove prefix "chr"
colnames(markers_2)[colnames(markers_2)=="bp_mm10"] <- "pos" 
colnames(markers_2)[colnames(markers_2)=="cM_cox"] <- "cM"
markers_2 <- markers_2 %>% drop_na(chr, marker) 
markers_2$pos <- as.numeric(markers_2$pos) * 1e-6
rownames(markers_2) <- markers_2$marker
colnames(markers_2)[c(1:4)] <- c("marker", "chr", "pos", "pos")
#codes <- markers_1[markers_1$marker %in% markers_2$marker,]
#codes <- codes[,c("marker","chr","A","B")]

##keeping only markers in code list for chromosome 1:10,X
codes <- codes[codes$marker %in% markers_2$marker,]
dim(markers_2)
[1] 137302     15
dim(codes)
[1] 137302      4

preparing files

h5_info <- h5ls(hdf5_filename)
h5_info <- h5_info[h5_info$group == "/G",]
h5_info <- h5_info[order(as.numeric(h5_info$name)),]
num_samples <- strsplit(h5_info$dim, " x ")  ##num of samples per project
n=length(num_samples)
num_rows <- as.numeric(num_samples[[1]][1])
num_samples <- c(0, as.numeric(sapply(num_samples, "[", 2)))  
rn <- h5read(hdf5_filename, "rownames/1")
geno <- matrix("", nrow = num_rows, ncol = sum(num_samples),dimnames = list(rn, rep("", sum(num_samples))))
for(i in 1:n) {
    G  <- h5read(hdf5_filename, paste0("G/", i))
    cn <- h5read(hdf5_filename, paste0("colnames/", i))
    colnames(G) <- cn
    rng  <- (sum(num_samples[1:i]) + 1):sum(num_samples[1:(i+1)])
    geno[,rng] <- G
    colnames(geno)[rng] <- colnames(G)
} 
# Remove samples that should not be included.
idx2 <- intersect(colnames(geno), sample_inventory$Original.Mouse.ID)
geno <- geno[ ,colnames(geno) %in% idx2, drop=FALSE]
dim(geno)
[1] 143259    366
geno <- geno[ ,sample_inventory$Original.Mouse.ID]  
colnames(geno) <- sample_inventory$Unique.Sample.ID

# Keep only the good SNPs.
geno <- geno[rownames(markers_2),]
dim(geno)
[1] 137302    366
#codes <- codes[codes$marker %in% rownames(geno),]
#codes <- codes[rownames(geno),]

##encdoing markers for qtl2
geno.1 <- qtl2convert::encode_geno(geno, as.matrix(codes[,c("A","B")]))

#encoding markers for backcross
geno.1[geno.1 == "A"] <- "AA"
geno.1[geno.1 == "H"] <- "AB"
geno.1[geno.1 == "B"] <- "AA"

geno.2 <- qtl2convert::encode_geno(geno, as.matrix(codes[,c("A","B")]))

##saving files--------------------

##reording markers file
#names(markers)[3:4] <- c("bp_mm10","cM_cox")
#markers_2 <- markers_2[order(markers_2$chr, markers_2$pos), ]
#markers_2 <- markers_2[mixedorder(markers_2$chr), ]


##physical map
write.csv(markers_2[,1:3], file = "data/physical_map_7.batches_myo.csv",row.names = FALSE, quote = FALSE)


##genetic map
write.csv(markers_2[,c(1,2,4)], file = "data/genetic_map_7.batches_myo.csv",row.names = FALSE, col.names =c("marker", "chr", "pos"), quote = FALSE)  

##sample genotypes
marker.names <- markers_2[,"marker"]
sample.geno.2 <- data.frame(marker = marker.names, geno.2[marker.names,], stringsAsFactors = F, check.names=F)
write.csv(sample.geno.2, file = "data/sample_geno_AHB_7.batches_myo.csv",row.names = F, quote = F)

sample.geno.1 <- data.frame(marker = marker.names, geno.1[marker.names,], stringsAsFactors = F, check.names=F)
write.csv(sample.geno.1, file = "data/sample_geno_bc_7.batches_myo.csv",row.names = F, quote = F)


# Write out temp covariates
# Write out covariates
#covar <- data.frame(id = sample_inventory$Unique.Sample.ID, sex = sample_inventory$Sex,generation = sample_inventory$DO.Generation)
#rownames(covar) <- covar$id
covar <- read.csv("/Users/corneb/Documents/MyJax/CS/Projects/Serreze/haplotype.reconstruction/output_7.batches_myo/qtl2/GM_covar_pheno_myo_7.batches.csv")
rownames(covar) <- covar[,1]
covar <- covar[,-1]
write.csv(covar, file <- "data/GM_covar_7.batches_myo.csv", quote = FALSE, row.names = TRUE)

# Write out phenotypes  
pheno <- matrix(rnorm(ncol(geno)), nrow = ncol(geno), ncol = 1, dimnames =
                   list(colnames(geno), "pheno")) 
rownames(pheno) <- make.unique(rownames(pheno))
write.csv(pheno, file <- "data/pheno_7.batches_myo.csv", row.names = TRUE, quote = FALSE)

Genoprobs for QC/Haplotype Phasing

gm <- read_cross2("/Users/corneb/Documents/MyJax/CS/Projects/Serreze/haplotype.reconstruction/output_7.batches_myo/gm_bc_7.batches_myo_BC366.json")

gm
Object of class cross2 (crosstype "bc")

Total individuals               366
No. genotyped individuals       366
No. phenotyped individuals      366
No. with both geno & pheno      366

No. phenotypes                    1
No. covariates                   11
No. phenotype covariates          0

No. chromosomes                  20
Total markers                137302

No. markers by chr:
    1     2     3     4     5     6     7     8     9    10    11    12    13 
10423 10441  8206  7955  8030  8130  7760  6717  6984  6631  7433  6444  6327 
   14    15    16    17    18    19     X 
 6230  5534  5179  5323  4787  3676  5092 
#Let’s omit markers without any genotype data
gm <- drop_nullmarkers(gm)
Dropping 3586 markers with no data
gm
Object of class cross2 (crosstype "bc")

Total individuals               366
No. genotyped individuals       366
No. phenotyped individuals      366
No. with both geno & pheno      366

No. phenotypes                    1
No. covariates                   11
No. phenotype covariates          0

No. chromosomes                  20
Total markers                133716

No. markers by chr:
    1     2     3     4     5     6     7     8     9    10    11    12    13 
10159 10172  7987  7736  7778  7911  7548  6561  6823  6471  7276  6226  6177 
   14    15    16    17    18    19     X 
 6082  5421  5075  5162  4682  3612  4857 
save(gm, file = "data/gm_serreze_bc_7.batches_myo.RData")
probs <- calc_genoprob(gm, quiet = TRUE)
saveRDS(probs, file = "data/probs_36state_bc_7.batches_myo.rds")
aprobs <- genoprob_to_alleleprob(probs, quiet=TRUE)
saveRDS(aprobs, file = "data/probs_8state_bc_7.batches_myo.rds")


e <- calc_errorlod(gm, probs, cores=20)
e <- do.call("cbind", e)
save(e, file = "data/e_7.batches_myo.RData")

sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur ... 10.16

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] gtools_3.9.4      abind_1.4-5       qtl2_0.30         reshape2_1.4.4   
 [5] ggplot2_3.4.0     tibble_3.1.8      psych_2.2.9       readxl_1.4.1     
 [9] cluster_2.1.4     dplyr_1.0.10      optparse_1.7.3    rhdf5_2.40.0     
[13] mclust_6.0.0      tidyr_1.2.1       data.table_1.14.6 knitr_1.41       
[17] kableExtra_1.3.4  workflowr_1.7.0  

loaded via a namespace (and not attached):
 [1] httr_1.4.4         sass_0.4.4         bit64_4.0.5        jsonlite_1.8.4    
 [5] viridisLite_0.4.1  bslib_0.4.1        assertthat_0.2.1   getPass_0.2-2     
 [9] highr_0.9          blob_1.2.3         cellranger_1.1.0   yaml_2.3.6        
[13] pillar_1.8.1       RSQLite_2.2.19     lattice_0.20-45    glue_1.6.2        
[17] digest_0.6.30      promises_1.2.0.1   rvest_1.0.3        colorspace_2.0-3  
[21] htmltools_0.5.3    httpuv_1.6.6       plyr_1.8.8         pkgconfig_2.0.3   
[25] purrr_0.3.5        scales_1.2.1       webshot_0.5.4      processx_3.8.0    
[29] svglite_2.1.0      qtl_1.54           whisker_0.4.1      getopt_1.20.3     
[33] later_1.3.0        git2r_0.30.1       generics_0.1.3     ellipsis_0.3.2    
[37] cachem_1.0.6       withr_2.5.0        cli_3.4.1          mnormt_2.1.1      
[41] magrittr_2.0.3     memoise_2.0.1      evaluate_0.18      ps_1.7.2          
[45] fs_1.5.2           fansi_1.0.3        nlme_3.1-161       xml2_1.3.3        
[49] tools_4.2.2        qtl2convert_0.28   lifecycle_1.0.3    stringr_1.5.0     
[53] Rhdf5lib_1.18.2    munsell_0.5.0      callr_3.7.3        compiler_4.2.2    
[57] jquerylib_0.1.4    systemfonts_1.0.4  rlang_1.0.6        grid_4.2.2        
[61] rhdf5filters_1.8.0 rstudioapi_0.14    rmarkdown_2.18     gtable_0.3.1      
[65] DBI_1.1.3          R6_2.5.1           bit_4.0.5          fastmap_1.1.0     
[69] utf8_1.2.2         rprojroot_2.0.3    stringi_1.7.8      parallel_4.2.2    
[73] Rcpp_1.0.9         vctrs_0.5.1        tidyselect_1.2.0   xfun_0.35