# HG changeset patch # User devteam # Date 1447088669 18000 # Node ID c20a4a4acf3f3b9c44195786be6a32ceacf0036a # Parent 709d8669e8d68fcfaa74a665aa50563523fed952 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/bamtools/bamtools_filter commit 5a4e0ca9992af3a6e5ed2b533f04bb82ce761e0b diff -r 709d8669e8d6 -r c20a4a4acf3f bamtools-filter.xml --- a/bamtools-filter.xml Tue Oct 13 12:36:56 2015 -0400 +++ b/bamtools-filter.xml Mon Nov 09 12:04:29 2015 -0500 @@ -1,4 +1,4 @@ - + BAM datasets on a variety of attributes bamtools @@ -7,23 +7,21 @@ cat $script_file > $out_file2; #for $bam_count, $input_bam in enumerate( $input_bams ): - ln -s "${input_bam.input_bam}" "localbam_${bam_count}.bam" && - ln -s "${input_bam.input_bam.metadata.bam_index}" "localbam_${bam_count}.bam.bai" && + ln -s "${input_bam}" "localbam_${bam_count}.bam" && + ln -s "${input_bam.metadata.bam_index}" "localbam_${bam_count}.bam.bai" && #end for - + bamtools filter -script $script_file - + #for $bam_count, $input_bam in enumerate( $input_bams ): -in "localbam_${bam_count}.bam" #end for -out $out_file1 - - - + @@ -182,14 +180,14 @@ #for $i, $c in enumerate( $conditions, start=1 ) { "id": "$i", #for $j, $s in enumerate( $c.filters, start=1 ) - ##The if below takes care of the comma at the end of last condition within group + ##The if below takes care of the comma at the end of last condition within group #if $j != len( $c.filters) "${s.bam_property.bam_property_selector}":"${s.bam_property.bam_property_value}", #else "${s.bam_property.bam_property_selector}":"${s.bam_property.bam_property_value}" #end if #end for - ##The if below takes care of the comma at the end of last condition within group + ##The if below takes care of the comma at the end of last condition within group #if $i != len( $conditions ) }, #else @@ -214,10 +212,10 @@ - + - + @@ -264,8 +262,8 @@ **Example 3. Complex filtering with multiple conditions** -Suppose now you would like to select **either** reads that (**1**) have (*1.1*) no mismatches and (*1.2*) are on the forward strand **OR** (**2**) reads that have (*2.1*) -at least one mismatch and (*2.2*) are on the reverse strand. In this scenario we have to set up two conditions: (**1**) and (**2**) each with two filters: *1.1* and *1.2* as well as *2.1* and *2.2*. +Suppose now you would like to select **either** reads that (**1**) have (*1.1*) no mismatches and (*1.2*) are on the forward strand **OR** (**2**) reads that have (*2.1*) +at least one mismatch and (*2.2*) are on the reverse strand. In this scenario we have to set up two conditions: (**1**) and (**2**) each with two filters: *1.1* and *1.2* as well as *2.1* and *2.2*. The following screenshot expalins how this can be done: .. image:: complex-filters.png @@ -279,7 +277,7 @@ filtering will look like this:: !(1) & (2 | 3) - + Here, numbers 1, 2, and 3 represent conditions. The following screenshot illustrates how to do this in Galaxy: .. image:: rule.png