Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mpileup to vcf

    Hi everyone,

    I know there is a perl script 'sam2vcf.pl' to convert a pileup file to .vcf format. But I wanted to know whether there is any tools/script that converts mpileup format to .vcf format WITHOUT calling variants. I used:

    $ samtools mpileup -u -l chr1.snps -f hg19.fa sample1_filter_sort.bam | bcftools view - > out.vcf
    But this is giving me a weird output (unlike vcf):

    HTML Code:
    #CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	P01273_DCM
    chr1	1211292	.	C	X	0	.	DP=0;I16=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;QS=0.000000,0.000000,0.000000,0.000000	PL	0,0,0
    chr1	2069172	.	C	X	0	.	DP=0;I16=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;QS=0.000000,0.000000,0.000000,0.000000	PL	0,0,0
    Komal Rathi
    Bioinformatics Application Developer
    University of Pennsylvania

  • #2
    Look in the samtools manual:
    BCFTools view arguments:
    -v Output variant sites only (force -c)

    So your command becomes:
    Code:
    samtools mpileup -u -l chr1.snps -f hg19.fa sample1_filter_sort.bam | bcftools view -v -c - > out.vcf
    EDIT:
    I misunderstood your question, in my previous command you also calculate the variants...
    The file you have is already a vcf file, but with all positions in it, also the positions without a SNP...
    Last edited by Jetse; 03-12-2014, 04:00 AM.

    Comment

    Latest Articles

    Collapse

    • seqadmin
      Techniques and Challenges in Conservation Genomics
      by seqadmin



      The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

      Avian Conservation
      Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
      03-08-2024, 10:41 AM
    • seqadmin
      The Impact of AI in Genomic Medicine
      by seqadmin



      Artificial intelligence (AI) has evolved from a futuristic vision to a mainstream technology, highlighted by the introduction of tools like OpenAI's ChatGPT and Google's Gemini. In recent years, AI has become increasingly integrated into the field of genomics. This integration has enabled new scientific discoveries while simultaneously raising important ethical questions1. Interviews with two researchers at the center of this intersection provide insightful perspectives into...
      02-26-2024, 02:07 PM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by seqadmin, 03-14-2024, 06:13 AM
    0 responses
    32 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 03-08-2024, 08:03 AM
    0 responses
    71 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 03-07-2024, 08:13 AM
    0 responses
    80 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 03-06-2024, 09:51 AM
    0 responses
    68 views
    0 likes
    Last Post seqadmin  
    Working...
    X