Skip to content

Commit

Permalink
Switch to gawk to read fasta
Browse files Browse the repository at this point in the history
  • Loading branch information
erikrikarddaniel committed Sep 11, 2020
1 parent 7eb5336 commit cbc6b6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set version = "1.9.10" %}
{% set version = "1.9.11" %}

package:
name: pfitmap-db
Expand All @@ -25,3 +25,4 @@ requirements:
- r-stringr
- r-feather
- bioconductor-biostrings
- gawk
4 changes: 2 additions & 2 deletions src/R/pf-classify.r
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ suppressPackageStartupMessages(library(tidyr))
suppressPackageStartupMessages(library(stringr))
suppressPackageStartupMessages(library(feather))

SCRIPT_VERSION = "1.9.10"
SCRIPT_VERSION = "1.9.11"
ROWS_PER_SEQUENCE_TSV = 1e7

options(warn = 1)
Expand Down Expand Up @@ -501,7 +501,7 @@ if ( opt$options$seqfaa != '' ) {
cmd <- c(
sprintf("%s %s", ifelse(grepl('\\.gz$', opt$options$seqfaa), 'zcat', 'cat'), opt$options$seqfaa),
"sed '/^>/s/ .*//'",
"awk '/^>/ { printf(\"\\n%s\\n\",$$0); next; } { printf(\"%s\",$$0);} END { printf(\"\\n\");}'",
"gawk '/^>/ { printf(\"\\n%s\\n\",$$0); next; } { printf(\"%s\",$$0);} END { printf(\"\\n\");}'",
"grep -v '^$'",
"sed 's/^>//'",
"paste - -",
Expand Down

0 comments on commit cbc6b6c

Please sign in to comment.