Skip to content

Commit 333cb15

Browse files
authored
Update cargobay.sh
fix for sample names with hyphen in name when getting the position of the blast results
1 parent ee6f9e9 commit 333cb15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/cargobay.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ paftools.js delta2paf 2.HGT_candidates/alignments/${element}/${element}.${candid
430430

431431
## blast-all
432432
# run the blast of 1kb chunks against the genome with HGT candidate
433-
blastn -dust no -max_target_seqs 1 -max_hsps 1 -subject 2.HGT_candidates/assemblies/${candidategenome2}.fa -query ${sample}.1kbchunk.fa -outfmt 6 2>/dev/null | awk '{print $1"\t"$3"\t"($8-$7)}' | sed -E 's/[:\-]/\t/g' > 2.HGT_candidates/alignments/${element}/${element}.${candidategenome2}.blast.tsv
433+
blastn -dust no -max_target_seqs 1 -max_hsps 1 -subject 2.HGT_candidates/assemblies/${candidategenome2}.fa -query ${sample}.1kbchunk.fa -outfmt 6 2>/dev/null | awk '{print $1"\t"$3"\t"($8-$7)}' | awk '{split($1,a,":"); split(a[2],b,"-"); print a[1], b[1], b[2], $2, $3}' OFS="\t" > 2.HGT_candidates/alignments/${element}/${element}.${candidategenome2}.blast.tsv
434434
# set variables
435435
contig=$( echo "${coords}" | awk '{print $1}' )
436436
start=$(echo "${coords}" | awk '{print $2}')

0 commit comments

Comments
 (0)