Skip to content

Commit

Permalink
added vsearch path
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterprovoost committed Nov 6, 2024
1 parent 3d3f8f0 commit 9a440a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Build the fasta file, occurrence sqlite database, and bowtie2 database:
### Upload data

```sh
rsync -r data ***@***:/data/sequence-search/data
rsync -r data [email protected]:/data/sequence-search
```

### Run the API
Expand Down
6 changes: 4 additions & 2 deletions api/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
logging.basicConfig(level=logging.INFO)


os.environ["PATH"] += os.pathsep + "/Users/pieter/IPOfI Dropbox/Pieter Provoost/werk/projects/OBIS pipeline/sequence-search/vsearch-2.29.1-macos-aarch64/bin"
os.environ["PATH"] += os.pathsep + "/data/vsearch-2.29.1/bin"


def search_sequences(seq, strategy="vsearch"):

with tempfile.TemporaryDirectory() as tmpdir:
Expand Down Expand Up @@ -65,8 +69,6 @@ def search_sequences(seq, strategy="vsearch"):

blast_file_path = os.path.join(tmpdir, "output.blast")

vsearch_path = "/Users/pieter/IPOfI Dropbox/Pieter Provoost/werk/projects/OBIS pipeline/sequence-search/vsearch-2.29.1-macos-aarch64/bin"
os.environ["PATH"] += os.pathsep + vsearch_path
os.system(f"vsearch --usearch_global {input_file_path} --db ../data/sequences.udb --id 0.9 --query_cov 0.9 --maxaccepts 100 --maxrejects 100 --maxhits 100 --blast6out {blast_file_path}")

con = sqlite3.connect(sqlite_file_path)
Expand Down

0 comments on commit 9a440a7

Please sign in to comment.