SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to call variants from a BAM file based of a list of position ? dickie_ho Bioinformatics 2 07-04-2016 06:04 AM
vcf file - filter based on DP4 (not total) and removal alternative alleles clarissaboschi Bioinformatics 4 03-03-2015 03:15 AM
how to split a fasta file according to a list of gene ID lran2008 Bioinformatics 9 08-15-2013 12:54 AM
How to get list of column in vcf file using Vcf.pm? jessada Bioinformatics 0 01-20-2012 07:22 AM
BEDTools v2.8: VCF, split-alignments, new tools quinlana Bioinformatics 11 08-06-2010 09:19 AM

Reply
 
Thread Tools
Old 07-04-2016, 04:45 AM   #1
LeonDK
Member
 
Location: Denmark

Join Date: Sep 2014
Posts: 69
Default Split VCF file based on a list of samples

I have a VCF file and a file with a list of samples. I would like to create a new VCF file only containing the samples on the list.

I could write a script, but if someone already created something clever, that'd be nice?

Can't seem to find the relevant option in plink/bcftools?
LeonDK is offline   Reply With Quote
Old 07-04-2016, 05:14 AM   #2
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,978
Default

https://www.biostars.org/p/138694/
http://seqanswers.com/forums/showthread.php?t=24711
GenoMax is offline   Reply With Quote
Old 07-04-2016, 10:59 PM   #3
LeonDK
Member
 
Location: Denmark

Join Date: Sep 2014
Posts: 69
Default

Thank you!

For future reference,

Code:
vcf-subset -c sample1,sample2,sample3 myFile.vcf.gz > mySlicedFile.vcf
did the trick!

and I got vcftools from https://vcftools.github.io/downloads.html
LeonDK is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 08:00 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO