Created
February 2, 2011 09:49
-
-
Save lindenb/807481 to your computer and use it in GitHub Desktop.
test if one or more BAM files are sorted
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
moved to: https://github.com/lindenb/samtools-utilities/blob/master/src/bamsorted.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> for F in `find ~/tmp/ -name "*.bam"`; do echo $F; samtools index ${F} ; done | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/sam_merge_out2.bam | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/sam_merge_in1.bam | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/srma_out1.bam | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/srma_out2.bam | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/sam_merge_in3.bam | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/sam_merge_in2.bam | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/1.bam | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/srma_in1.bam | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/sam_to_bam_out1.bam | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/3.bam | |
[bam_index_core] the alignment is not sorted (HWI-EAS91_1_30788AAXX:1:1:799:192): 14955 > 8420 in 46-th chr | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/srma_in3.bam | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/sam_pileup_in1.bam | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/sam_to_bam_out2.bam | |
/home/lindenb/tmp/GALAXY/galaxy-dist/lib/galaxy/datatypes/test/1.bam | |
/home/lindenb/tmp/GALAXY/galaxy-dist/lib/galaxy/datatypes/test/3.bam | |
[bam_index_core] the alignment is not sorted (HWI-EAS91_1_30788AAXX:1:1:799:192): 14955 > 8420 in 46-th chr | |
> for F in `find ~/tmp/ -name "*.bam"`; do ./a.out ${F} ; done | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/sam_merge_out2.bam OK | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/sam_merge_in1.bam OK | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/srma_out1.bam OK | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/srma_out2.bam OK | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/sam_merge_in3.bam OK | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/sam_merge_in2.bam OK | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/1.bam OK | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/srma_in1.bam OK | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/sam_to_bam_out1.bam OK | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/3.bam Unsorted: On Reference[45]="chrM" position=8420 after 14955. | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/srma_in3.bam OK | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/sam_pileup_in1.bam OK | |
/home/lindenb/tmp/GALAXY/galaxy-dist/test-data/sam_to_bam_out2.bam OK | |
/home/lindenb/tmp/GALAXY/galaxy-dist/lib/galaxy/datatypes/test/1.bam OK | |
/home/lindenb/tmp/GALAXY/galaxy-dist/lib/galaxy/datatypes/test/3.bam Unsorted: On Reference[45]="chrM" position=8420 after 14955. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment