Git Product home page Git Product logo

haplomat2arlequin's Introduction

haplomat2arlequin

converts HLA data from Hapl-o-Mat to Arlequin.

It is not necessary to be on a server, because written in pure JavaScript. You can save html file to your computer, start it in a browser, by double clicking the html file. Your csv or tab-delimited files can be read from your hard disk.

Most people keep his/her HLA data on an Excel file, and examine them with various software. Hapl-o-mat and Arlequin are just two of them.

Hapl-o-Mat can read various formats : https://github.com/DKMS/Hapl-o-Mat/tree/master/examplePopulations

You can find more information about formats from page 11+ of https://github.com/DKMS/Hapl-o-Mat/blob/master/detailedGettingStartedWindows.pdf

MAC (Multiple Allele Codes) is one of those formats, and you can export from Excel if you keep your archive in Excel fomat

if you entered your data into Hapl-o-Mat in MAC format, you can convert your data to Arlequin format by using haplomat2arlequin

download raw data containing 100 samples of HLA data from https://github.com/DKMS/Hapl-o-Mat/blob/master/examplePopulations/populationData_a.dat

save as populationData_a.dat.txt

convert2arlequin.html javascript program uses paparse.min.js to read csv files, extracts locus names from the first line of comma seperated or table delimited file

steps:

1- click to convert2arlequin.html to run in a browser 
2- click choose file and select populationData_a.dat.txt
3- click read and see the MAC formatted file in "CSV input / Arlequin Output" text area
4- click convert and see the arp formatted file in "CSV input / Arlequin Output" text area
5- click copy
6- paste to your favorite text editor (for example notepad++)
7- save as from your favorite text editor, give a name with extension arp
8- open arp file as a project from Arlequin
9- instead of (5-8) you can use save button if your browser is compatible

you can change the options below, such as RecessiveData before saving data:

[Profile]

Title="A sample of human HLA data with recessive alleles"

NbSamples=1
GenotypicData=1
DataType=STANDARD
RecessiveData=1
GameticPhase=0
RecessiveAllele="NULL"
LocusSeparator=WHITESPACE
MissingData="?"

[Data]

[[Samples]]

	SampleName="A test HLA sample"

You can also use the haplomat2arlequin to read HLA data entered in Excel files

steps

1- Your excel documents first row must contain an id column, followed by HLA domains twice
2- Export your data as a csv file (it may contain commas instead of tabs, thanks to papaparse)
3- read csv file from convert2arlequin.html, just like Hapl-o-Mat in MAC format

What: You entered your data in excel, a line for every person. Arlequins wants one item for every HLA data. If more than one person shares same HLA data, you must supply:

1- An arbitrary (group) name for HLA data
2- Frequency of HLA data (how many person have that HLA data
3- HLA data itself

If a HLA data is unique in the population, frequency must 1

you can choose a prefix for group data by entering an arbitrary letter in Group prefix: before converting with convert2arlequin.html

If you look at last line-1 of Arlequin output then you understand how many HLA groups is present in your population.

Output of sample csv file, can be seen HLA-people.arp Hint: "2" after G1 means there are two people having this genotype

G1 2 A03 B31 C04 DR04 DQ04
A
24 B57 C06 DR07 DQ03

haplomat2arlequin's People

Contributors

zakcali avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.