conversion from plink to hapmap

1,651 views
Skip to first unread message

peter

unread,
Nov 27, 2013, 10:32:12 AM11/27/13
to tas...@googlegroups.com
Hi there,

I am curious if there is a way in tassel to convert the plink files (.ped and .map) into the hapmap format:

I was able to convert the hapmap to the plink using the following:
/tassel4-standalone/run_pipeline.pl -Xmx5g -fork1 -h test.hmp -export -exportType Plink  -runfork1

But when I tried the following to convert it back to plink format:
/share/apps/software/tassel4-standalone/run_pipeline.pl -Xmx5g -fork1 -p result.ped -export -exportType Hapmap  -runfork1

it complains about the java.lang.NumberFormatException: For input string: "NA"
'NA' is the familyID.

Any input will greatly appreciated! Thanks!

Best,

Peter

zhan...@umn.edu

unread,
Dec 8, 2015, 3:07:51 PM12/8/15
to TASSEL - Trait Analysis by Association, Evolution and Linkage
Hi, Peter,

   Did you solve the problem? I am also trying to covert .ped to hmp. Do you have any suggestions? Thank you.

Best,
Xiaofei

Terry Casstevens

unread,
Dec 8, 2015, 3:47:43 PM12/8/15
to Tassel User Group
This is how you do it with Tassel 5

./run_pipeline.pl -importGuess mdp_genotype.plk.ped -export
mdp_genotype -exportType Hapmap
> --
> You received this message because you are subscribed to the Google Groups
> "TASSEL - Trait Analysis by Association, Evolution and Linkage" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tassel+un...@googlegroups.com.
> To post to this group, send email to tas...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tassel/0f140130-2ae8-4e86-8117-47ea0ac57198%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Vicky

unread,
Aug 25, 2021, 4:58:32 PM8/25/21
to TASSEL - Trait Analysis by Association, Evolution and Linkage

Hi Terry,
I need this command for my task but it is giving an error because of sort position. Can I use this command -sortPositions?
I am getting this error:
tassel-5-standalone/run_pipeline.pl -importGuess all_samples_imputed_for_hapmap.plk.ped -export all_samples_imputed_for_hapmap.plk -exportType Hapmap

Memory Settings: -Xms512m -Xmx1536m
Tassel Pipeline Arguments: -importGuess all_samples_imputed_for_hapmap.plk.ped -export all_samples_imputed_for_hapmap.plk -exportType Hapmap
[main] INFO net.maizegenetics.tassel.TasselLogging - Tassel Version: 5.2.72  Date: April 8, 2021
[main] INFO net.maizegenetics.tassel.TasselLogging - Max Available Memory Reported by JVM: 1536 MB
[main] INFO net.maizegenetics.tassel.TasselLogging - Java Version: 11.0.10
[main] INFO net.maizegenetics.tassel.TasselLogging - OS: Linux
[main] INFO net.maizegenetics.tassel.TasselLogging - Number of Processors: 64
[main] INFO net.maizegenetics.pipeline.TasselPipeline - Tassel Pipeline Arguments: [-fork1, -importGuess, all_samples_imputed_for_hapmap.plk.ped, -export, all_samples_imputed_for_hapmap.plk, -exportType, Hapmap, -runfork1]
net.maizegenetics.analysis.data.FileLoadPlugin
   net.maizegenetics.analysis.data.ExportMultiplePlugin
[pool-1-thread-1] INFO net.maizegenetics.plugindef.AbstractPlugin - Starting net.maizegenetics.analysis.data.FileLoadPlugin: time: Aug 25, 2021 22:53:31
[pool-1-thread-1] INFO net.maizegenetics.plugindef.AbstractPlugin - 
FileLoadPlugin Parameters
format: Make Best Guess
sortPositions: false
keepDepth: true

[pool-1-thread-1] INFO net.maizegenetics.analysis.data.FileLoadPlugin - Start Loading File: all_samples_imputed_for_hapmap.plk.ped time: Aug 25, 2021 22:53:31
[pool-1-thread-1] INFO net.maizegenetics.analysis.data.FileLoadPlugin - guessAtUnknowns: type: Plink
[pool-1-thread-1] INFO net.maizegenetics.dna.snp.io.BuilderFromPLINK - Reading: all_samples_imputed_for_hapmap.plk.ped and all_samples_imputed_for_hapmap.plk.map
[pool-1-thread-1] ERROR net.maizegenetics.util.Utils - getBufferedReader: Error getting reader for: all_samples_imputed_for_hapmap.plk.map
[pool-1-thread-1] INFO net.maizegenetics.plugindef.AbstractPlugin - 
Usage:
FileLoadPlugin <options>
-format <Format> : Import file format [SqrMatrix, Sequence, Unknown, Fasta, Hapmap, HapmapLIX, Plink, Phenotype, ProjectionAlignment, ProjectPCsandRunModelSelection, Phylip_Seq, Phylip_Inter, Table, Serial, HapmapDiploid, Newick, VCF, HDF5, TOPM, HDF5Schema, Filter, NumericGenotype, TaxaList, PositionList, SqrMatrixRaw, SqrMatrixBin, GOBII, Depth, ReferenceProbability, Report, PlinkPhenotype, SqrMatrixDARwinDIS, Avro, Flapjack] (Default: Make Best Guess)
-sortPositions <true | false> : Whether to sort genotype positions if that's possible. (Default: false)
-keepDepth <true | false> : Whether to keep depth if that's possible. (Default: true)

Without .plk option, it can parse the command but without header in the hapmap file. So only map file is causing the issue.
Can you please look into it?
Thanks,

Vinod 

Terry Casstevens

unread,
Aug 25, 2021, 5:12:14 PM8/25/21
to Tassel User Group
Is your map file named this? all_samples_imputed_for_hapmap.plk.map

Please use -debug for more information
> To view this discussion on the web visit https://groups.google.com/d/msgid/tassel/f609d41f-1f10-4a77-827a-193723195483n%40googlegroups.com.

Vicky

unread,
Aug 26, 2021, 4:44:34 AM8/26/21
to TASSEL - Trait Analysis by Association, Evolution and Linkage
Thank you very much Terry. It was easy and quick but took my whole day in just trying multiple things.
Can I export in 2 letters nucleotide code instead of IUPAC code?
Thanks,

Vinod,

Terry Casstevens

unread,
Aug 26, 2021, 10:20:29 AM8/26/21
to Tassel User Group
Yes you can use 2 letter nucleotides instead of IUPAC codes, but you
can't mix the two in the same file.
> To view this discussion on the web visit https://groups.google.com/d/msgid/tassel/b02040ed-8939-461e-8118-61042be0bd84n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages