Skip to content

Instantly share code, notes, and snippets.

@pjbriggs
Created July 2, 2015 15:04
Show Gist options
  • Save pjbriggs/cc7f785781d18823e1cb to your computer and use it in GitHub Desktop.
Save pjbriggs/cc7f785781d18823e1cb to your computer and use it in GitHub Desktop.
Test scripts for vsearch functions, to generate example data for the vsearch Galaxy tools
#!/bin/sh
#
# Generate test outputs for clustering
#
# Existing test case (--cluster_fast)
vsearch \
--notrunclabels \
--cluster_fast BioMarKs5k.fsa.bz2 \
--maxrejects 2 \
--maxaccepts 1 \
--id 0.99 \
--centroids clustering_centroids_result1.fasta \
--alnout clustering_alnout_result1.fasta \
--blast6out clustering_blast6out_result1.tab \
--notmatched clustering_notmatched_result1.fasta \
--qmask dust \
--strand plus
#
# New test cases
#
# --cluster_smallmem
vsearch \
--notrunclabels \
--cluster_smallmem BioMarKs5k.fsa.bz2 \
--maxrejects 2 \
--maxaccepts 1 \
--id 0.99 \
--centroids clustering_centroids_result2.fasta \
--blast6out clustering_blast6out_result2.tab \
--notmatched clustering_notmatched_result2.fasta \
--qmask dust \
--sizeout \
--strand plus \
--usersort
#
# --cluster_smallmem with uclust-like output
vsearch \
--notrunclabels \
--cluster_smallmem BioMarKs5k.fsa.bz2 \
--maxrejects 2 \
--maxaccepts 1 \
--id 0.99 \
--centroids clustering_centroids_result3.fasta \
--qmask dust \
--sizeout \
--strand plus \
--uc clustering_uc_result3.fasta \
--usersort
#
# --cluster_smallmem with non-default --iddef
vsearch \
--notrunclabels \
--cluster_smallmem BioMarKs5k.fsa.bz2 \
--maxrejects 2 \
--maxaccepts 1 \
--id 0.99 \
--centroids clustering_centroids_result4.fasta \
--qmask dust \
--sizeout \
--strand plus \
--iddef 0 \
--usersort
#
# --cluster_fast with --qmask none
vsearch \
--notrunclabels \
--cluster_fast BioMarKs5k.fsa.bz2 \
--maxrejects 2 \
--maxaccepts 1 \
--id 0.99 \
--centroids clustering_centroids_result5.fasta \
--qmask none \
--strand plus
#!/bin/sh
#
# Generate output test data for vsearch dereplication
#
./vsearch \
--derep_fulllength AF091148_first_rep.fsa.bz2 \
--maxuniquesize 100000 \
--minuniquesize 1 \
--output dereplication_result2.fasta \
--sizeout \
--strand both
#
./vsearch \
--derep_fulllength AF091148_first_rep.fsa.bz2 \
--maxuniquesize 100000 \
--minuniquesize 1 \
--output dereplication_result3.fasta \
--sizeout \
--strand both \
--topn 10000 \
--uc dereplication_uc_result3.fasta
##
#
#!/bin/sh
#
# Generate test outputs for sorting
#
# --sortbysize
vsearch \
--notrunclabels \
--sortbysize "db.fasta" \
--output sorting_result1.fasta \
#
# --sortbylength
vsearch \
--notrunclabels \
--sortbylength "db.fasta" \
--output sorting_result2.fasta \
#
# --relabel
vsearch \
--notrunclabels \
--sortbylength "db.fasta" \
--output sorting_result3.fasta \
--relabel "TEST"
#
# --sizeout
vsearch \
--notrunclabels \
--sortbylength "db.fasta" \
--output sorting_result4.fasta \
--sizeout
#
# --relabel with spaces
vsearch \
--notrunclabels \
--sortbylength "db.fasta" \
--output sorting_result5.fasta \
--relabel "With spaces"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment