Header Leaderboard Ad

Collapse

Resorting chromosome order in a VCF file to match reference

Collapse

Announcement

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

  • Resorting chromosome order in a VCF file to match reference

    Hi, thank you in advance for any help.

    I am trying to re-order the chromosome order in a VCF file to match that of the reference file.

    I have tried vcftools -sort, but I want my order to go back to the 'unnatural' order and this appears to only sort to the natural order.

    I have also tried vcfsorter.pl, but this simply resulted in the output having the header and nothing else.

    Any ideas? As simple as possible please....!

  • #2
    use picard SortVcf http://broadinstitute.github.io/pica...w.html#SortVcf

    "Sorts one or more VCF files according to the order of the contigs in the header/sequence dictionary and then by coordinate. Can accept an external sequence dictionary. If no external dictionary is supplied, multiple inputs' headers must have the same sequence dictionaries. Multiple inputs must have the same sample names (in order)"

    Comment


    • #3
      Thank you - that looks perfect.

      I am very new at this, and just have one more question. I have downloaded and unzipped picard but can not find any examples on their github site of how to put in and execute the command for this.....

      Comment


      • #4
        Originally posted by acedraper1 View Post
        Thank you - that looks perfect.

        I am very new at this, and just have one more question. I have downloaded and unzipped picard but can not find any examples on their github site of how to put in and execute the command for this.....


        java -jar picard.jar SortVcf INPUT=in.vcf OUTPUT=out.vcf

        Comment

        Latest Articles

        Collapse

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, 05-26-2023, 09:22 AM
        0 responses
        8 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 05-24-2023, 09:49 AM
        0 responses
        9 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 05-23-2023, 07:14 AM
        0 responses
        29 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 05-18-2023, 11:36 AM
        0 responses
        113 views
        0 likes
        Last Post seqadmin  
        Working...
        X