This is a test version of Biostars. For the public version, visit https://www.biostars.org.
vcf format to Mapmaker format

Hi everyone,

I am trying to convert my vcf file into mapmaker format to run in OneMap in R. Does anyone know of a script that is already available that can do this conversion.

Thank you

Bryan

snp mapmaker

I'm also interested for this answer. FYI, I tried MapDisto which claims that it can do the conversion but I couldn't get it to work. Have you tried this yet?

@arnstrm I was able to get work for every type of cross but the outcross that I want to do. Which type of cross are you trying to do in onemap.

What does a mapmaker format look like?

If you are unable to find anything, maybe you can extract the genotype information in vcftools using --extract-FORMAT-info GT then use sed or awk to format the data files accordingly by clearing out whitespace, the / character, etc. Again, depends on what a mapmaker input file looks like.

10 5
*M1 B3.7 ab,ab,-,ab,b,ab,ab,-,ab,b
*M2 D2.18 o,-,a,a,-,o,a,-,o,o
*M3 D1.13 o,a,a,o,o,-,a,o,a,o
*M4 A.4 ab,b,-,ab,a,b,ab,b,-,a
*M5 D2.18 a,a,o,-,o,o,a,o,o,o

This is the make up of input file.

1 answer

Old thread, but I've been learning OneMap recently and wanted to note that OneMap can now take a vcfR object as input. The steps to make this work would be

library(vcfR)
library(onemap)

# read in vcf file
myvcf <- read.vcfR("/path/to/myvcf")

# convert vcf to onemap object
mycross <- onemap_read_vcfR(myvcf , 
    parent1 = "<parent1 sample ID>", 
    parent2 = "<parent2 sample ID>", 
    cross = "<cross type>")

See more here: http://augustogarcia.me/onemap/vignettes_highres/Inbred_Based_Populations.html#importing-data-from-vcf-file

Best, Dave

Log in to answer this question.