The sort order of my bam file is:
So I created a names.txt to do a sortBed in bedtools but it appears that the option I need is not there.
Basically, since the sort order of my bam is in "human ordering" I wanted to sort my bed in the same way. Thank you
.
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
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 *****

Comment