Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic genetic map #2

Open
rodrigopsav opened this issue Jul 21, 2021 · 5 comments
Open

Generic genetic map #2

rodrigopsav opened this issue Jul 21, 2021 · 5 comments

Comments

@rodrigopsav
Copy link

Hello, I've been working with LPS imputation and I am trying to use a generic genetic map. I've got the following message. Is there any suggestion how to write a generic genetic map of 1cMperMb? Thanks

$(dirname $CONDA_PREFIX)/imputeme/bin/QUILT_prepare_reference.R \

--chr=$CHR
--regionStart=2000000
--regionEnd=3000000
--buffer=200000
--reference_haplotype_file=impute_onlyHol_woHolSra_chr29.hap.gz
--reference_legend_file=impute_onlyHol_woHolSra_chr29.legend.gz
--outputdir=quilt_output
--genetic_map_file=genMap_1cMperMb_29.txt
--tempdir=tmp
--nGen=100
Warning message:
package ‘optparse’ was built under R version 4.0.5
Warning message:
package ‘QUILT’ was built under R version 4.0.5
[2021-07-21 13:19:02] Running QUILT_prepare_reference(outputdir = quilt_output, chr = 29, nGen = 100, regionStart = 2000000, regionEnd = 3000000, buffer = 200000, output_file = , reference_haplotype_file = impute_onlyHol_woHolSra_chr29.hap.gz, reference_legend_file = impute_onlyHol_woHolSra_chr29.legend.gz, reference_sample_file = , reference_populations = NA, reference_phred = 30, reference_exclude_samplelist_file = , region_exclude_file = , genetic_map_file = genMap_1cMperMb_29.txt, nMaxDH = NA, tempdir = tmp, make_fake_vcf_with_sites_list = FALSE, output_sites_filename = NA, expRate = 1, maxRate = 100, minRate = 0.1)
[2021-07-21 13:19:02] Program start
[2021-07-21 13:19:02] Begin converting reference haplotypes
[2021-07-21 13:19:03] Begin get haplotypes from reference
[2021-07-21 13:19:03] Load and validate reference legend header
[2021-07-21 13:19:03] Load and validate reference legend
[2021-07-21 13:19:03] Extract reference haplotypes
[2021-07-21 13:19:03] In the region to be imputed plus buffer there are the following number of SNPs:
[2021-07-21 13:19:03] 11868 from the posfile
[2021-07-21 13:19:03] 11868 from the reference haplotypes
[2021-07-21 13:19:03] 11868 in the intersection of the posfile and the reference haplotypes
[2021-07-21 13:19:05] Succesfully extracted 1996 haplotypes from reference data
[2021-07-21 13:19:05] End get haplotypes from reference
[2021-07-21 13:19:05] Getting and validating genetic map
position COMBINED_rate.cM.Mb. Genetic_Map.cM.
1 2000090 1 2.000090
2 2000144 1 2.000144
Error in validate_genetic_map(genetic_map) :
Error interpreting genetic map around row 1. Provided genetic map does not satisfy expectations. See above print. Let g be the genetic map with 3 columns. In 1-based coordinates, recall that g[iRow, 3] must equal g[iRow - 1, 3] + ( (g[iRow, 1] - g[iRow - 1, 1]) * g[iRow - 1, 2])
Calls: QUILT_prepare_reference ... get_and_validate_genetic_map -> validate_genetic_map
Execution halted

@rwdavies
Copy link
Owner

Ah, so QUILT can work without a reference panel (see below the help message for the genetic map file option). In that case, it should default to 1 cM/Mbp (the default of expRate)

Path to file with genetic map information, a file with 3 white-space delimited entries giving position (1-based), genetic rate map in cM/Mbp, and genetic map in cM. If no file included, rate is based on physical distance and expected rate (expRate) [default \"\"]

@rodrigopsav
Copy link
Author

Thanks for your help.

@PMuchina
Copy link

@rwdavies in your response did you mean QUILT can work without a genetic map? assuming a recombination rate of 1 cM/Mbp.

@rwdavies
Copy link
Owner

rwdavies commented Nov 1, 2024

Yes it should work, with expRate setting the default, I'm not sure about all combinations, but I just checked the simplest acceptance test in QUILT/tests/testthat/test-acceptance-one.R and deleted the genetic map input to QUILT_prepare_reference and it ran

@PMuchina
Copy link

PMuchina commented Nov 1, 2024

Yes, it worked for me to. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants