Question: Convert multi-allele to bi-allele
0
gravatar for kelly.wang135
3.8 years ago by
Korea, Republic Of
kelly.wang13550 wrote:

Hi all,

I have a vcf file and several positions have multi-allele like

REF=TTT

ALT=T,TT,TTTT,TTTTT

To my knowledge, rare variant association tools only handle bi-allele sites. But I want to include these positions, too. So I tried to convert these sites into bi-allelic sites like "ins/del".

I used python to create this file, but the converted sites were not supported by association tool.

Does anyone know how to convert multi- to bi-allele?

vcf • 3.7k views
ADD COMMENTlink modified 3.8 years ago by Pierre Lindenbaum134k • written 3.8 years ago by kelly.wang13550
1

In my opinion, we can separate these multi-allelic variants and do the association separately with specific statistic method.

ADD REPLYlink written 2.6 years ago by Shicheng Guo8.6k
1
gravatar for Pierre Lindenbaum
3.8 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum134k wrote:

I've written a tool VcfMultiToOneAllele http://lindenb.github.io/jvarkit/VcfMultiToOneAllele.html

there's also a tool in GATK: LeftAlignAndTrimVariants https://software.broadinstitute.org/gatk/documentation/tooldocs/current/org_broadinstitute_gatk_tools_walkers_variantutils_LeftAlignAndTrimVariants.php with an option splitMultiallelics

--splitMultiallelics / -split

Split multiallelic records and left-align individual alleles If this argument is set, split multiallelic records and left-align individual alleles. If this argument is not set, multiallelic records are not attempted to left-align and will be copied as is.

UPDATE 2021: use bcftools norm

ADD COMMENTlink modified 13 days ago • written 3.8 years ago by Pierre Lindenbaum134k

Thank you. But I don't want to split these sites into multiple sites. I want the number of lines remain same as before. What I want to do finally is association test, but the association tool will handle these multiple variants as independent, though they are actually from same position.

So the result file I want to have from the example above is like REF=Del, ALT=Ins and T,TT,TTT will be coded as Del, and TTTT, TTTTT should be Ins.

Thanks.

ADD REPLYlink written 3.8 years ago by kelly.wang13550

what about REF=A ALT=T,C ?

ADD REPLYlink written 3.8 years ago by Pierre Lindenbaum134k

For those sites, I want to just remove them.

But for indels, multi-alleles are not caused by noises. So I want to include these sites to association test and I need to simplify them first. Actually I made it with python, but there was something wrong with new vcf file. It seems these newly D/I coded sites are not supported by variant tools, or other tools. These lines were just skipped.

ADD REPLYlink written 3.8 years ago by kelly.wang13550

The VcfMultiToOneAllele is giving the following error when I try to use ./gradlew

Downloading https://services.gradle.org/distributions/gradle-6.7-bin.zip

Exception in thread "main" java.net.ConnectException: Connection timed out (Connection timed out)
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:607)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:284)
        at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1570)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
        at org.gradle.wrapper.Download.downloadInternal(Download.java:78)
        at org.gradle.wrapper.Download.download(Download.java:63)
        at org.gradle.wrapper.Install$1.call(Install.java:68)
        at org.gradle.wrapper.Install$1.call(Install.java:48)
        at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
        at org.gradle.wrapper.Install.createDist(Install.java:48)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)
ADD REPLYlink written 13 days ago by User000440

you're working behing a firewall. https://stackoverflow.com/questions/8938994/gradlew-behind-a-proxy

ADD REPLYlink written 13 days ago by Pierre Lindenbaum134k

Is there a chance to use the tool without gradle?

ADD REPLYlink written 12 days ago by User000440

Is there a chance to use the tool without gradle?

no

ADD REPLYlink written 12 days ago by Pierre Lindenbaum134k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1350 users visited in the last hour
_