changeset 1:f2e4e81f3639

Add tool_dependencies.xml and test-data
author Jim Johnson <jj@umn.edu>
date Mon, 01 Apr 2013 10:57:16 -0500
parents 5dcbce4f5971
children 9710e9bcc5f3
files README samtools_filter.xml test-data/bam_to_sam_in1.sam test-data/bam_to_sam_in2.sam tool_dependencies.xml
diffstat 5 files changed, 77 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README	Mon Apr 01 10:57:16 2013 -0500
@@ -0,0 +1,29 @@
+**What it does**
+
+This tool uses the samtools view command in SAMTools toolkit to filter a SAM or BAM file on the MAPQ (mapping quality), FLAG bits, Read Group, Library, or region.
+
+**Input**
+
+Input is either a SAM or BAM file.
+
+**Output**
+
+The output file will be of the same format a the Input file, filtered by the selected options.
+
+**Options**
+
+Filtering by read group or library requires headers in the input SAM or BAM file.
+
+If regions are specified, only alignments overlapping the specified regions will be output.  An alignment may be given multiple times if it is overlapping several regions.
+A region can be presented, for example, in the following format
+
+  chr2  (the whole chr2)
+  chr2:1000000   (region starting from 1,000,000bp)
+  chr2:1,000,000-2,000,000      (region between 1,000,000 and 2,000,000bp including the end points).
+
+Note:  The coordinate is 1-based.
+
+Multiple regions may be specified, separated by a space character
+
+  chr2:1000000-2000000 chr2:1,000,000-2,000,000 chrX
+
--- a/samtools_filter.xml	Fri Mar 30 16:36:54 2012 -0400
+++ b/samtools_filter.xml	Mon Apr 01 10:57:16 2013 -0500
@@ -1,7 +1,7 @@
-<tool id="samtools_filter" name="Filter SAM or BAM" version="1.1.0">
+<tool id="samtools_filter" name="Filter SAM or BAM" version="1.1.1">
   <description>files on FLAG MAPQ RG LN or by region</description>
   <requirements>
-    <requirement type="package">samtools</requirement>
+    <requirement type="package" version="0.1.18">samtools</requirement>
   </requirements>
   <!-- 
     samtools view [-bchuHS] [-t in.refList] [-o output] [-f reqFlag] [-F skipFlag] [-q minMapQ] [-l library] [-r readGroup] [-R rgFile] <in.bam>|<in.sam> [region1 [...]]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bam_to_sam_in1.sam	Mon Apr 01 10:57:16 2013 -0500
@@ -0,0 +1,14 @@
+@HD	VN:1.0	SO:coordinate
+@SQ	SN:chr1	LN:101
+@SQ	SN:chr7	LN:404
+@SQ	SN:chr8	LN:202
+@RG	ID:0	SM:Hi,Mom!
+@PG	ID:1	PN:Hey!	VN:2.0
+both_reads_align_clip_marked	83	chr7	1	255	101M	=	302	201	CAACAGAAGCNGGNATCTGTGTTTGTGTTTCGGATTTCCTGCTGAANNGNTTNTCGNNTCNNNNNNNNATCCCGATTTCNTTCCGCAGCTNACCTCCCAAN	)'.*.+2,))&&'&*/)-&*-)&.-)&)&),/-&&..)./.,.).*&&,&.&&-)&&&0*&&&&&&&&/32/,01460&&/6/*0*/2/283//36868/&	RG:Z:0
+both_reads_present_only_first_aligns	89	chr7	1	255	101M	*	0	0	CAACAGAAGCNGGNATCTGTGTTTGTGTTTCGGATTTCCTGCTGAANNGNTTNTCGNNTCNNNNNNNNATCCCGATTTCNTTCCGCAGCTNACCTCCCAAN	)'.*.+2,))&&'&*/)-&*-)&.-)&)&),/-&&..)./.,.).*&&,&.&&-)&&&0*&&&&&&&&/32/,01460&&/6/*0*/2/283//36868/&	RG:Z:0
+read_2_too_many_gaps	83	chr7	1	255	101M	=	302	201	CAACAGAAGCNGGNATCTGTGTTTGTGTTTCGGATTTCCTGCTGAANNGNTTNTCGNNTCNNNNNNNNATCCCGATTTCNTTCCGCAGCTNACCTCCCAAN	)'.*.+2,))&&'&*/)-&*-)&.-)&)&),/-&&..)./.,.).*&&,&.&&-)&&&0*&&&&&&&&/32/,01460&&/6/*0*/2/283//36868/&	RG:Z:0
+both_reads_align_clip_adapter	147	chr7	16	255	101M	=	21	-96	CAACAGAAGCNGGNATCTGTGTTTGTGTTTCGGATTTCCTGCTGAANNGNTTNTCGNNTCNNNNNNNNATCCCGATTTCNTTCCGCAGCTNACCTCCCAAN	)'.*.+2,))&&'&*/)-&*-)&.-)&)&),/-&&..)./.,.).*&&,&.&&-)&&&0*&&&&&&&&/32/,01460&&/6/*0*/2/283//36868/&	RG:Z:0
+both_reads_align_clip_adapter	99	chr7	21	255	101M	=	16	96	CAACAGAAGCNGGNATCTGTGTTTGTGTTTCGGATTTCCTGCTGAANNGNTTNTCGNNTCNNNNNNNNATCCCGATTTCNTTCCGCAGCTNACCTCCCAAN	)'.*.+2,))&&'&*/)-&*-)&.-)&)&),/-&&..)./.,.).*&&,&.&&-)&&&0*&&&&&&&&/32/,01460&&/6/*0*/2/283//36868/&	RG:Z:0
+both_reads_align_clip_marked	163	chr7	302	255	101M	=	1	-201	NCGCGGCATCNCGATTTCTTTCCGCAGCTAACCTCCCGACAGATCGGCAGCGCGTCGTGTAGGTTATTATGGTACATCTTGTCGTGCGGCNAGAGCATACA	&/15445666651/566666553+2/14/&/555512+3/)-'/-&-'*+))*''13+3)'//++''/'))/3+&*5++)&'2+&+/*&-&&*)&-./1'1	RG:Z:0
+read_2_too_many_gaps	163	chr7	302	255	10M1D10M5I76M	=	1	-201	NCGCGGCATCNCGATTTCTTTCCGCAGCTAACCTCCCGACAGATCGGCAGCGCGTCGTGTAGGTTATTATGGTACATCTTGTCGTGCGGCNAGAGCATACA	&/15445666651/566666553+2/14/&/555512+3/)-'/-&-'*+))*''13+3)'//++''/'))/3+&*5++)&'2+&+/*&-&&*)&-./1'1	RG:Z:0
+both_reads_present_only_first_aligns	165	*	0	0	*	chr7	1	0	NCGCGGCATCNCGATTTCTTTCCGCAGCTAACCTCCCGACAGATCGGCAGCGCGTCGTGTAGGTTATTATGGTACATCTTGTCGTGCGGCNAGAGCATACA	&/15445666651/566666553+2/14/&/555512+3/)-'/-&-'*+))*''13+3)'//++''/'))/3+&*5++)&'2+&+/*&-&&*)&-./1'1	RG:Z:0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bam_to_sam_in2.sam	Mon Apr 01 10:57:16 2013 -0500
@@ -0,0 +1,25 @@
+@HD	VN:1.0	SO:coordinate
+@SQ	SN:chr1	LN:10001
+@SQ	SN:chr2	LN:100001
+@SQ	SN:chr3	LN:10001
+@SQ	SN:chr4	LN:1001
+@RG	ID:rg1	SM:s1
+@RG	ID:rg2	SM:s3
+bar:record:4	77	chr1	1	0	*	*	0	0	AAAAAAAAAAAAA	1111111111111	RG:Z:rg1
+bar:record:6	77	chr1	1	0	*	*	0	0	AAAAAAAAAAAAA	1111111111111	RG:Z:rg2
+bar:record:1	77	chr1	10	0	*	*	0	0	AAAAAAAAAAAAA	1111111111111	RG:Z:rg1
+bar:record:3	77	chr1	10	0	*	*	0	0	AAAAAAAAAAAAA	1111111111111	RG:Z:rg2
+bar:record:1	141	chr1	20	0	*	*	0	0	CCCCCCCCCCCCC	2222222222222	RG:Z:rg1
+bar:record:7	77	chr1	20	0	*	*	0	0	AAAAAAAAAAAAA	1111111111111	RG:Z:rg2
+bar:record:8	77	chr1	30	0	*	*	0	0	AAAAAAAAAAAAA	1111111111111	RG:Z:rg2
+bar:record:4	141	chr1	40	0	*	*	0	0	CCCCCCCCCCCCC	2222222222222	RG:Z:rg1
+bar:record:5	77	chr1	40	0	*	*	0	0	AAAAAAAAAAAAA	1111111111111	RG:Z:rg2
+bar:record:6	141	chr1	50	0	*	*	0	0	CCCCCCCCCCCCC	2222222222222	RG:Z:rg2
+bar:record:2	77	chr2	10	0	*	*	0	0	AAAAAAAAAAAAA	1111111111111	RG:Z:rg1
+bar:record:2	141	chr2	30	0	*	*	0	0	CCCCCCCCCCCCC	2222222222222	RG:Z:rg2
+bar:record:3	141	chr3	20	0	*	*	0	0	CCCCCCCCCCCCC	2222222222222	RG:Z:rg1
+bar:record:8	141	chr3	20	0	*	*	0	0	CCCCCCCCCCCCC	2222222222222	RG:Z:rg1
+bar:record:5	141	chr3	40	0	*	*	0	0	CCCCCCCCCCCCC	2222222222222	RG:Z:rg1
+bar:record:9	77	chr4	10	0	*	*	0	0	AAAAAAAAAAAAA	1111111111111	RG:Z:rg1
+bar:record:7	141	chr4	20	0	*	*	0	0	CCCCCCCCCCCCC	2222222222222	RG:Z:rg1
+bar:record:9	141	chr4	60	0	*	*	0	0	CCCCCCCCCCCCC	2222222222222	RG:Z:rg1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml	Mon Apr 01 10:57:16 2013 -0500
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<tool_dependency>
+    <package name="samtools" version="0.1.18">
+        <repository toolshed="http://toolshed.g2.bx.psu.edu" name="samtools_0_1_18" owner="devteam" changeset_revision="a7936f4ea405" />
+    </package>
+</tool_dependency>
+