rename samples in a vcf or plink file
1
0
Entering edit mode
5.4 years ago
jaafari.omid ▴ 80

Hello dears all,

Actually I have a vcf file which it has been generated through samtools/bcftools pipeline. This file doesn't have just the sample names, indeed it has the samples' PATH in it. So what I want to do is removing the PATH and simply just keep the sample names. Moreover, if it is possible to remove these PATH from a.ped file I would be grateful if you can help me to solve my error. Here is a part of my vcf and as it can be seen there is PATH for each sample:

#CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO    FORMAT  /home2/omid/alignment/BAM/F0-F06-10-markdup.bam /home2/omid/alignment/BAM/F0-F06-11-markdup.bam      /home2/omid/alignment/BAM/F0-F06-12-markdup.bam /home2/omid/alignment/BAM/F0-F06-13-markdup.bam /home2/omid/alignment/BAM/F0-F07-11-markdup.bam      /home2/omid/alignment/BAM/F0-F07-12-markdup.bam /home2/omid/alignment/BAM/F0-F07-13-markdup.bam /home2/omid/alignment/BAM/F0-F07-14-markdup.bam      /home2/omid/alignment/BAM/F0-F08-11-markdup.bam /home2/omid/alignment/BAM/F0-F08-12-markdup.bam /home2/omid/alignment/BAM/F0-F25-10-markdup.bam      /home2/omid/alignment/BAM/F0-F25-11-markdup.bam /home2/omid/alignment/BAM/F0-F25-12-markdup.bam /home2/omid/alignment/BAM/F0-F25-13-markdup.bam      /home2/omid/alignment/BAM/F0-F25-14-markdup.bam /home2/omid/alignment/BAM/F0-F25-15-markdup.bam /home2/omid/alignment/BAM/F0-F25-16-markdup.bam

Thank you very much in advance.

Regards,

Omid

snp vcf plink • 4.2k views
ADD COMMENT
2
Entering edit mode
ADD REPLY
0
Entering edit mode

Thank you so much, I will check it.

regards,

Omid

ADD REPLY
5
Entering edit mode
5.4 years ago

Take a look at bcftools reheader, which should be able to solve your issue.

ADD COMMENT
0
Entering edit mode

Thank you for your answer. I will give it a try and hope it work.

Cheers,

Omid

ADD REPLY
0
Entering edit mode

Thank you very much. It worked properly.

Regards,

Omid

ADD REPLY
1
Entering edit mode

A small educational note: if an answer was helpful you should upvote it, if the answer resolved your question you should mark it as accepted.

Upvote|Bookmark|Accept

ADD REPLY

Login before adding your answer.

Traffic: 1869 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6