# HG changeset patch
# User devteam
# Date 1429646213 14400
# Node ID 0072bf5937917a552e825b265f69ea7dac50fd0b
# Parent a3dd61e7bec174240a772f8141041e23b73a610d
Uploaded
diff -r a3dd61e7bec1 -r 0072bf593791 macros.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml Tue Apr 21 15:56:53 2015 -0400
@@ -0,0 +1,70 @@
+
+
+
+ samtools
+
+
+
+
+
+
+ @misc{SAM_def,
+ title={Definition of SAM/BAM format},
+ url = {https://samtools.github.io/hts-specs/SAMv1.pdf},}
+
+ 10.1093/bioinformatics/btp352
+ 10.1093/bioinformatics/btr076
+ 10.1093/bioinformatics/btr509
+
+ @misc{Danecek_et_al,
+ Author={Danecek, P., Schiffels, S., Durbin, R.},
+ title={Multiallelic calling model in bcftools (-m)},
+ url = {http://samtools.github.io/bcftools/call-m.pdf},}
+
+
+ @misc{Durbin_VCQC,
+ Author={Durbin, R.},
+ title={Segregation based metric for variant call QC},
+ url = {http://samtools.github.io/bcftools/rd-SegBias.pdf},}
+
+
+ @misc{Li_SamMath,
+ Author={Li, H.},
+ title={Mathematical Notes on SAMtools Algorithms},
+ url = {http://www.broadinstitute.org/gatk/media/docs/Samtools.pdf},}
+
+
+ @misc{SamTools_github,
+ title={SAMTools GitHub page},
+ url = {https://github.com/samtools/samtools},}
+
+
+
+
+ samtools --version | head -n 1 | awk '{ print $2 }'
+
+
+
+
+
+
+
+-----
+
+.. class:: warningmark
+
+**No options available? How to re-detect metadata**
+
+If you see a "No options available" within the "**Select references (chromosomes and contigs) you would like to restrict bam to**" drop down, you need to re-detect metadata for the dataset you are trying to process. To do this follow these steps:
+
+1. Click on the **pencil** icon adjacent to the dataset in the history
+2. A new menu will appear in the center pane of the interface
+3. Click **Datatype** tab
+4. Set **New Type** to **BAM**
+5. Click **Save**
+
+The medatada will be re-detected and you will be able to see the list of reference sequences in the "**Select references (chromosomes and contigs) you would like to restrict bam to**" drop-down.
+
+
+
+
diff -r a3dd61e7bec1 -r 0072bf593791 samtools_flagstat.xml
--- a/samtools_flagstat.xml Thu Mar 27 15:23:45 2014 -0400
+++ b/samtools_flagstat.xml Tue Apr 21 15:56:53 2015 -0400
@@ -1,8 +1,11 @@
-
-
- samtools
-
- provides simple stats on BAM files
+
+ tabulate descriptive stats for BAM datset
+
+ macros.xml
+
+
+
+
samtools flagstat "$input1" > "$output1"
@@ -13,7 +16,7 @@
-
+
@@ -21,17 +24,22 @@
**What it does**
-This tool uses the SAMTools_ toolkit to produce simple stats on a BAM file.
-
-.. _SAMTools: http://samtools.sourceforge.net/samtools.shtml
-
-------
+Uses ``samtools flagstat`` command to print descriptive information for a BAM dataset. Here is an example of such information::
-**Citation**
-
-For the underlying tool, please cite `Li H, Handsaker B, Wysoker A, Fennell T, Ruan J, Homer N, Marth G, Abecasis G, Durbin R; 1000 Genome Project Data Processing Subgroup. The Sequence Alignment/Map format and SAMtools. Bioinformatics. 2009 Aug 15;25(16):2078-9. <http://www.ncbi.nlm.nih.gov/pubmed/19505943>`_
-
-If you use this tool in Galaxy, please cite Blankenberg D, et al. *In preparation.*
-
+ 200 + 0 in total (QC-passed reads + QC-failed reads)
+ 0 + 0 secondary
+ 0 + 0 supplementary
+ 0 + 0 duplicates
+ 25 + 0 mapped (12.50%:nan%)
+ 200 + 0 paired in sequencing
+ 100 + 0 read1
+ 100 + 0 read2
+ 0 + 0 properly paired (0.00%:nan%)
+ 0 + 0 with itself and mate mapped
+ 25 + 0 singletons (12.50%:nan%)
+ 0 + 0 with mate mapped to a different chr
+ 0 + 0 with mate mapped to a different chr (mapQ>=5)
+
+
diff -r a3dd61e7bec1 -r 0072bf593791 test-data/3unsorted.bam
Binary file test-data/3unsorted.bam has changed
diff -r a3dd61e7bec1 -r 0072bf593791 test-data/samtools_flagstat_input1.bam
Binary file test-data/samtools_flagstat_input1.bam has changed
diff -r a3dd61e7bec1 -r 0072bf593791 test-data/samtools_flagstat_out1.txt
--- a/test-data/samtools_flagstat_out1.txt Thu Mar 27 15:23:45 2014 -0400
+++ b/test-data/samtools_flagstat_out1.txt Tue Apr 21 15:56:53 2015 -0400
@@ -1,11 +1,13 @@
-10 + 0 in total (QC-passed reads + QC-failed reads)
+200 + 0 in total (QC-passed reads + QC-failed reads)
+0 + 0 secondary
+0 + 0 supplementary
0 + 0 duplicates
-10 + 0 mapped (100.00%:nan%)
-0 + 0 paired in sequencing
-0 + 0 read1
-0 + 0 read2
-0 + 0 properly paired (nan%:nan%)
+25 + 0 mapped (12.50%:nan%)
+200 + 0 paired in sequencing
+100 + 0 read1
+100 + 0 read2
+0 + 0 properly paired (0.00%:nan%)
0 + 0 with itself and mate mapped
-0 + 0 singletons (nan%:nan%)
+25 + 0 singletons (12.50%:nan%)
0 + 0 with mate mapped to a different chr
0 + 0 with mate mapped to a different chr (mapQ>=5)
diff -r a3dd61e7bec1 -r 0072bf593791 tool_dependencies.xml
--- a/tool_dependencies.xml Thu Mar 27 15:23:45 2014 -0400
+++ b/tool_dependencies.xml Tue Apr 21 15:56:53 2015 -0400
@@ -1,6 +1,6 @@
-
-
+
+