Announcement

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

  • bedtools sort by faidx

    The sort order of my bam file is:

    Code:
    cmccabe@DTV-A5211QLM:~/Desktop/NGS/pool_I_090215$ samtools view -H IonXpress_008_150902_newheader.bam | grep SQ | cut -f 2 | awk '{ sub(/^SN:/, ""); print;}'
    chr1
    chr2
    chr3
    chr4
    chr5
    chr6
    chr7
    chr8
    chr9
    chr10
    chr11
    chr12
    chr13
    chr14
    chr15
    chr16
    chr17
    chr18
    chr19
    chr20
    chr21
    chr22
    chrX
    chrY
    chrM
    So I created a names.txt to do a sortBed in bedtools but it appears that the option I need is not there.

    Code:
    Tool:    bedtools sort (aka sortBed)
    Version: v2.25.0
    Summary: Sorts a feature file in various and useful ways.
    
    Usage:   bedtools sort [OPTIONS] -i <bed/gff/vcf>
    
    Options: 
    	-sizeA			Sort by feature size in ascending order.
    	-sizeD			Sort by feature size in descending order.
    	-chrThenSizeA		Sort by chrom (asc), then feature size (asc).
    	-chrThenSizeD		Sort by chrom (asc), then feature size (desc).
    	-chrThenScoreA		Sort by chrom (asc), then score (asc).
    	-chrThenScoreD		Sort by chrom (asc), then score (desc).
    	-faidx (names.txt)	Sort according to the chromosomes declared in "names.txt"
    	-header	Print the header from the A file prior to results.
    
    cmccabe@DTV-A5211QLM:~/Desktop/NGS$ sortBed faidx -i /home/cmccabe/Desktop/NGS/bed/bedtools/xgen_targets.bed > /home/cmccabe/Desktop/NGS/bed/bedtools/xgen_targets_sorted.bed
    
    *****ERROR: Unrecognized parameter: faidx *****
    Basically, since the sort order of my bam is in "human ordering" I wanted to sort my bed in the same way. Thank you .

  • #2
    Did you try

    Code:
    $ sortBed -faidx -i etc.

    Comment


    • #3
      I tried that and got:

      Code:
      Tool:    bedtools sort (aka sortBed)
      Version: v2.25.0
      Summary: Sorts a feature file in various and useful ways.
      
      Usage:   bedtools sort [OPTIONS] -i <bed/gff/vcf>
      
      Options: 
      	-sizeA			Sort by feature size in ascending order.
      	-sizeD			Sort by feature size in descending order.
      	-chrThenSizeA		Sort by chrom (asc), then feature size (asc).
      	-chrThenSizeD		Sort by chrom (asc), then feature size (desc).
      	-chrThenScoreA		Sort by chrom (asc), then score (asc).
      	-chrThenScoreD		Sort by chrom (asc), then score (desc).
      	-faidx (names.txt)	Sort according to the chromosomes declared in "names.txt"
      	-header	Print the header from the A file prior to results.
      
      
      cmccabe@DTV-A5211QLM:~/Desktop/NGS$ sortBed -faidx -i /home/cmccabe/Desktop/NGS/bed/bedtools/xgen_targets.bed > /home/cmccabe/Desktop/NGS/bed/bedtools/xgen_targets_sorted.bed
      
      *****ERROR: Unrecognized parameter: /home/cmccabe/Desktop/NGS/bed/bedtools/xgen_targets.bed *****
      I checked the directory where the bed is located as well:
      Code:
      cmccabe@DTV-A5211QLM:~/Desktop/NGS$ ls /home/cmccabe/Desktop/NGS/bed/bedtools
      names.txt  names.txt~  xgen_targets.bed  xgen_targets.bed~
      Thank you .

      Is there a better way to sort by human ordering for the bed file. I have searched but it appears "lexical" ordering is preferred. Thanks.
      Last edited by cmccabe; 09-28-2015, 12:30 PM.

      Comment


      • #4
        Did you actually read the output, or just copy and paste when it didn't work?

        Code:
        -faidx (names.txt)  Sort according to the chromosomes declared in "names.txt"
        You have to specify the sorting file when you issue the command, immediately after the option flag.

        Comment

        Latest Articles

        Collapse

        • seqadmin
          Advanced Tools Transforming the Field of Cytogenomics
          by seqadmin


          At the intersection of cytogenetics and genomics lies the exciting field of cytogenomics. It focuses on studying chromosomes at a molecular scale, involving techniques that analyze either the whole genome or particular DNA sequences to examine variations in structure and behavior at the chromosomal or subchromosomal level. By integrating cytogenetic techniques with genomic analysis, researchers can effectively investigate chromosomal abnormalities related to diseases, particularly...
          Yesterday, 06:26 AM
        • seqadmin
          How RNA-Seq is Transforming Cancer Studies
          by seqadmin



          Cancer research has been transformed through numerous molecular techniques, with RNA sequencing (RNA-seq) playing a crucial role in understanding the complexity of the disease. Maša Ivin, Ph.D., Scientific Writer at Lexogen, and Yvonne Goepel Ph.D., Product Manager at Lexogen, remarked that “The high-throughput nature of RNA-seq allows for rapid profiling and deep exploration of the transcriptome.” They emphasized its indispensable role in cancer research, aiding in biomarker...
          09-07-2023, 11:15 PM
        • seqadmin
          Methods for Investigating the Transcriptome
          by seqadmin




          Ribonucleic acid (RNA) represents a range of diverse molecules that play a crucial role in many cellular processes. From serving as a protein template to regulating genes, the complex processes involving RNA make it a focal point of study for many scientists. This article will spotlight various methods scientists have developed to investigate different RNA subtypes and the broader transcriptome.

          Whole Transcriptome RNA-seq
          Whole transcriptome sequencing...
          08-31-2023, 11:07 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, Today, 06:57 AM
        0 responses
        6 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, Yesterday, 07:53 AM
        0 responses
        8 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 09-25-2023, 07:42 AM
        0 responses
        14 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 09-22-2023, 09:05 AM
        0 responses
        44 views
        0 likes
        Last Post seqadmin  
        Working...
        X