Entering edit mode
24 months ago
octpus616
▴
120
Hi,
I recall that samtools provided a powerful expression based filtering feature samtools view -e 'filter_expression'
, which seemed to work fine in the past, but doesn't work anymore, and I don't know why.
$ samtools view -e 'length(seq)>30' input.bam
view: invalid option -- 'e'
[E::hts_open_format] fail to open file 'length(seq)>30'
samtools view: failed to open "length(seq)>30" for reading: No such file or directory
$ samtools --help
Program: samtools (Tools for alignments in the SAM format)
Version: 1.3.1 (using htslib 1.3.1)
Usage: samtools <command> [options]
Commands:
-- Indexing
dict create a sequence dictionary file
faidx index/extract FASTA
index index alignment
...
Can you update samtools to the newest version?
I also update to
1.16.1
, but it also not work. Another command--input-fmt-option
is available in1.16.1
. I noted that can be used to insteadsamtools view -e 'filter_expression'
. I still don't know why the previous command is no longer available( https://meta.stackexchange.com/questions/147616 ) what was the command ? did you check the $PATH ?
I checked, In fact, I also tried it with an absolute path
I downloaded the source code from https://sourceforge.net/projects/samtools/ and compile it, and get the binary
samtools
, I think This is the lastest versionzhangfish Why did you delete this post?
I deleted my existing conda environment and recreated it, then recompiled samtools and now he is able to work, this seems to be a strange problem, I can no longer reproduce it, I don't want this post to be misleading if it cannot reproduce
The comment you added above is more informative and useful to the community than you merely deleting the post. Someone could run into the exact same unreproducible error then try your delete+recreate solution and that might work for them. Don't delete your posts unless you're sure there's no value in them. When someone's given you feedback on the subject matter and you've interacted with them, that interaction is of value and you should no longer feel the need to delete the post.