[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tests #85

Merged
merged 9 commits into from
Sep 11, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Trying to fix missing csvtk problem in tests.
  • Loading branch information
bsipos committed Sep 10, 2019
commit 5b599c896aeaf5a2d48c8346b6418db9fce88935
22 changes: 13 additions & 9 deletions tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ set -e
cd seqkit; go build; cd ..;
app=./seqkit/seqkit

which csvtk || (git clone https://github.com/shenwei356/csvtk; cd ./csvtk/csvtk; go build)
CSVTK=csvtk
which csvtk || CSVTK=./csvtk/csvtk

set +e

STOP_ON_FAIL=1
Expand Down Expand Up @@ -209,8 +213,8 @@ fun () {
echo -e "Len\tQual" > seqkit.tsv
$app fx2tab -q -l $READS_FQ | cut -f 4,5 >> seqkit.tsv
paste seqkit.tsv $NANO_FQ_TSV > joint.tsv
csvtk corr -t -f Len,lengths joint.tsv 2> corr_len.tsv
csvtk corr -t -f Qual,quals joint.tsv 2> corr_qual.tsv
$CSVTK corr -t -f Len,lengths joint.tsv 2> corr_len.tsv
$CSVTK corr -t -f Qual,quals joint.tsv 2> corr_qual.tsv
}
run fx2tab_qual_len fun
RL=$(cut -f 3 corr_len.tsv)
Expand Down Expand Up @@ -416,7 +420,7 @@ return $CODE
fun(){
$app bam -f Read,Acc $PRIM_BAM 2> seqkit_acc.tsv
paste seqkit_acc.tsv $PRIM_NANOPLOT > joint.tsv
csvtk corr -t -f Acc,percentIdentity joint.tsv 2> corr.tsv
$CSVTK corr -t -f Acc,percentIdentity joint.tsv 2> corr.tsv
}
run bam_acc fun
R=$(cut -f 3 corr.tsv)
Expand All @@ -429,7 +433,7 @@ rm corr.tsv seqkit_acc.tsv joint.tsv
fun(){
$app bam -f Read,MeanQual $PRIM_BAM 2> seqkit.tsv
paste seqkit.tsv $PRIM_NANOPLOT > joint.tsv
csvtk corr -t -f MeanQual,quals joint.tsv 2> corr.tsv
$CSVTK corr -t -f MeanQual,quals joint.tsv 2> corr.tsv
}
run bam_mean_qual fun
R=$(cut -f 3 corr.tsv)
Expand All @@ -442,7 +446,7 @@ rm corr.tsv seqkit.tsv joint.tsv
fun(){
$app bam -f Read,MapQual $PRIM_BAM 2> seqkit.tsv
paste seqkit.tsv $PRIM_NANOPLOT > joint.tsv
csvtk corr -t -f MapQual,mapQ joint.tsv 2> corr.tsv
$CSVTK corr -t -f MapQual,mapQ joint.tsv 2> corr.tsv
}
run bam_map_qual fun
R=$(cut -f 3 corr.tsv)
Expand All @@ -455,7 +459,7 @@ rm corr.tsv seqkit.tsv joint.tsv
fun(){
$app bam -f Read,ReadLen $PRIM_BAM 2> seqkit.tsv
paste seqkit.tsv $PRIM_NANOPLOT > joint.tsv
csvtk corr -t -f ReadLen,lengths joint.tsv 2> corr.tsv
$CSVTK corr -t -f ReadLen,lengths joint.tsv 2> corr.tsv
}
run bam_read_len fun
R=$(cut -f 3 corr.tsv)
Expand All @@ -468,7 +472,7 @@ rm corr.tsv seqkit.tsv joint.tsv
fun(){
$app bam -f Read,ReadAln $PRIM_BAM 2> seqkit.tsv
paste seqkit.tsv $PRIM_NANOPLOT > joint.tsv
csvtk corr -t -f ReadAln,aligned_lengths joint.tsv 2> corr.tsv
$CSVTK corr -t -f ReadAln,aligned_lengths joint.tsv 2> corr.tsv
}
run bam_read_aln fun
R=$(cut -f 3 corr.tsv)
Expand All @@ -484,7 +488,7 @@ fun(){
head -1 joint.tsv > TMP
grep "\+" joint.tsv >> TMP
mv TMP joint.tsv
csvtk corr -t -f LeftClip,ClipStart joint.tsv 2> corr.tsv
$CSVTK corr -t -f LeftClip,ClipStart joint.tsv 2> corr.tsv
}
run bam_left_clip fun
R=$(cut -f 3 corr.tsv)
Expand All @@ -500,7 +504,7 @@ fun(){
head -1 joint.tsv > TMP
grep "\+" joint.tsv >> TMP
mv TMP joint.tsv
csvtk corr -t -f RightClip,ClipEnd joint.tsv 2> corr.tsv
$CSVTK corr -t -f RightClip,ClipEnd joint.tsv 2> corr.tsv
}
run bam_right_clip fun
R=$(cut -f 3 corr.tsv)
Expand Down