Skip to content

Commit

Permalink
updated testing
Browse files Browse the repository at this point in the history
  • Loading branch information
malonge committed Aug 17, 2020
1 parent 54e9ba5 commit db1a34e
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tests/integration_tests/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ragtag_output_tomato_default
ragtag_output_Ara_nucmer
ragtag_output_Ara_nucmer
ragtag_output_ecoli_val
10 changes: 9 additions & 1 deletion tests/integration_tests/run_run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#!/usr/bin/env bash

bash run_tests.sh ~/Projects/Reference_Genomes/Tomato/SL4.0.genome.fasta ~/Projects/ragtag_workspace/tomato_test_env/Brandywine.assembly.polished.fasta ~/Projects/ragtag_workspace/tomato_test_env/brandywine_ctg_genes.gff ~/Projects/Reference_Genomes/Arabidopsis/GCF_000001735.3_TAIR10_genomic.fna ~/Projects/ragtag_workspace/ara_test_env/Arabidopsis.MaSuRCA.3.4.0.fasta ~/Projects/ragtag_workspace/ara_test_env/Arabidopsis.MaSuRCA.3.4.0.genes.gff
bash run_tests.sh ~/Projects/Reference_Genomes/Tomato/SL4.0.genome.fasta \
~/Projects/ragtag_workspace/tomato_test_env/Brandywine.assembly.polished.fasta \
~/Projects/ragtag_workspace/tomato_test_env/brandywine_ctg_genes.gff \
~/Projects/Reference_Genomes/Arabidopsis/GCF_000001735.3_TAIR10_genomic.fna \
~/Projects/ragtag_workspace/ara_test_env/Arabidopsis.MaSuRCA.3.4.0.fasta \
~/Projects/ragtag_workspace/ara_test_env/Arabidopsis.MaSuRCA.3.4.0.genes.gff \
~/Projects/ragtag_workspace/ecoli_tests/GCF_000008865.2_ASM886v2_genomic.fna \
~/Projects/ragtag_workspace/ecoli_tests/ecoli.contigs.fasta \
~/Projects/ragtag_workspace/ecoli_tests/reads.fofn
34 changes: 33 additions & 1 deletion tests/integration_tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
## 4. ara reference
## 5. ara query
## 6. ara gff
## 7. E. coli reference
## 8. E. coli query
## 9. E.coli reads fofn

# Assumes fasta suffixes are ".fasta"
# Assumes gff suffixes are ".gff"
Expand Down Expand Up @@ -37,6 +40,11 @@ A_QUERY_PREF=`basename $A_QUERY .fasta`
A_GFF=$6
A_GFF_PREF=`basename $A_GFF .gff`

E_REF=$7
E_QUERY=$8
E_QUERY_PREF=`basename $E_QUERY .fasta`
E_VAL_FOFN=$9


# Run RagTag
# Settings: default
Expand Down Expand Up @@ -156,4 +164,28 @@ bash scripts/validate_results.sh ragtag_output_Ara_nucmer/ragtag.correction.agp
~/Projects/ragtag_workspace/static_results/ara/ragtag.correction.agp

bash scripts/validate_results.sh ragtag_output_Ara_nucmer/ragtag.scaffolds.agp \
~/Projects/ragtag_workspace/static_results/ara/ragtag.scaffolds.agp
~/Projects/ragtag_workspace/static_results/ara/ragtag.scaffolds.agp


# Run RagTag
# Settings: with error-corrected long-read validation
# Data: E. coli
echo ""
echo "**************************************************************"
echo "*** Running RagTag on E. coli data with validation ***"
echo "**************************************************************"
echo ""

bash scripts/run_val.sh $E_REF \
$E_QUERY \
$E_VAL_FOFN \
ragtag_output_ecoli_val

# Validate the agp files
echo ""
mecho "Validating AGP files and associated fasta files:"
echo ""

bash scripts/validate_agp.sh $E_QUERY \
ragtag_output_ecoli_val/$E_QUERY_PREF.corrected.fasta \
ragtag_output_ecoli_val/ragtag.correction.agp
32 changes: 32 additions & 0 deletions tests/integration_tests/scripts/run_val.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash

# run the ragtag correction with read validation (error corrected long reads)

# position args:
## 1. reference
## 2. query
## 3. reads.fofn
## 4. output dir

# Assumes query suffix is ".fasta"

Usage() {
echo "Usage: $0 ref.fa query.fa reads.fofn output_dir"
}

mecho() {
NAME=`basename $0`
echo "$NAME:" $1
}

if [ $# -lt 3 ] ; then
Usage
exit 1
fi

REF=$1
QUERY=$2
READS=$3
OUTDIR=$4

ragtag.py correct -F $READS -T corr --debug -t 2 -u -o $OUTDIR $REF $QUERY

0 comments on commit db1a34e

Please sign in to comment.