Mercurial > repos > richard-burhans > segalign
comparison run_segalign_diagonal_partition @ 7:39c21be8f8b9 draft
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/segalign commit a87a48f823756ba950e9c87593342cfb90570e7b
author | richard-burhans |
---|---|
date | Tue, 07 May 2024 15:28:36 +0000 |
parents | 36cafb694dd2 |
children |
comparison
equal
deleted
inserted
replaced
6:6c95c380bfa7 | 7:39c21be8f8b9 |
---|---|
78 echo "Converting fasta files to 2bit format" 1>&2 | 78 echo "Converting fasta files to 2bit format" 1>&2 |
79 | 79 |
80 ## | 80 ## |
81 ## convert target and query to 2bit | 81 ## convert target and query to 2bit |
82 ## | 82 ## |
83 faToTwoBit "$ref_path" "$DATA_FOLDER/ref.2bit" || { | 83 faToTwoBit <(gzip -cdfq "$ref_path") "$DATA_FOLDER/ref.2bit" || { |
84 echo "run_segalign_diagonal_partition: cannot convert \"$ref_path\" to 2bit" 1>&2 | 84 echo "run_segalign_diagonal_partition: cannot convert \"$ref_path\" to 2bit" 1>&2 |
85 exit 1 | 85 exit 1 |
86 } | 86 } |
87 faToTwoBit "$query_path" "$DATA_FOLDER/query.2bit" || { | 87 faToTwoBit <(gzip -cdfq "$query_path") "$DATA_FOLDER/query.2bit" || { |
88 echo "run_segalign_diagonal_partition: cannont convert \"$ref_path\" to 2bit" 1>&2 | 88 echo "run_segalign_diagonal_partition: cannont convert \"$ref_path\" to 2bit" 1>&2 |
89 exit 1 | 89 exit 1 |
90 } | 90 } |
91 | 91 |
92 | 92 |
93 | 93 |
94 time { | 94 time { |
95 while IFS= read -r line; do | 95 while IFS= read -r line; do |
96 python "$TOOL_DIRECTORY/diagonal_partition.py" $MAX_SEGMENT_SIZE $line >> $LASTZ_COMMAND_FILE | 96 python "$TOOL_DIRECTORY/diagonal_partition.py" $MAX_SEGMENT_SIZE $line >> $LASTZ_COMMAND_FILE || { |
97 echo "run_segalign_diagonal_partition: failed: diagonal_partition.py $MAX_SEGMENT_SIZE $line" 1>&2 | |
98 exit 1 | |
99 } | |
97 # segalign sort writes out the partitioned segment files to the working | 100 # segalign sort writes out the partitioned segment files to the working |
98 # directory and prints the modified lastz commands. | 101 # directory and prints the modified lastz commands. |
99 done < <(stdbuf -oL segalign $ref_path $query_path "${DATA_FOLDER}/" "$@" ) # segalign begins running in this line, | 102 done < <(stdbuf -oL segalign $ref_path $query_path "${DATA_FOLDER}/" "$@" ) # segalign begins running in this line, |
100 } 1>&2 # and every newline written to stdout, get assigned to $line which | 103 } 1>&2 # and every newline written to stdout, get assigned to $line which |
101 # gets sent to diagonal_partition for diagonal partitioning | 104 # gets sent to diagonal_partition for diagonal partitioning |