Comments (9)
from seqkit.
You can use the option --id-regexp
to specify the IDs for matching.
seqkit grep -f nonproductiveIDs.txt nucleotide.fasta -o nonprodnucl.fasta --id-regexp '^(.+)_frame='
from seqkit.
Hello,
I used that option and I still got this message:
[INFO] 608703 patterns loaded from file
and the file "nonprodnucl.fasta" is empty. Is it okay to use -o for the output files?
Thank you
from seqkit.
[INFO] 608703 patterns loaded from file
It just shows how many patterns are loaded.
The key problem is that these patterns have suffixes like _frame=1
, which do not exist in the sequence file. So, we need to remove these suffixes before searching.
seqkit grep -f <(perl -pne 's/_frame\=\d+$//' nonproductiveIDs.txt) nucleotide.fasta -o nonprodnucl.fasta
Is it okay to use -o for the output files?
It is.
from seqkit.
Oh, I understand.
I would like to create the IDs.txt with the first 15 characters of the headers, because that sequence is an UMI and it's unique for every sequence. How could I do it?
from seqkit.
seqkit seq nonprod_seq.fasta -ni --id-regexp '(^.+?)\|' -o IDs.txt
Or
seqkit seq nonprod_seq.fasta -ni | cut -d '|' -f 1 > IDs.txt
Then you need to add the same --id-regexp '(^.+?)\|'
when using seqkit grep
, if the format does not change in nucleotide.fasta
.
from seqkit.
and to create the IDs.txt with the full header except the _frame=
(example) part? How could I do it?
from seqkit.
Well, you can just simply combine the methods above.
seqkit seq nonprod_seq.fasta -n | perl -pne 's/_frame\=\d+$//' > IDs.txt
from seqkit.
Hello, I ran this code:
seqkit seq nonproductive_seqs.fasta -ni --id-regexp 's/_frame\=\d+$//' -o IDs.txt
and I'm getting this error:
[ERRO] fastx: regular expression must contain "(" and ")" to capture matched ID. default: ^(\S+)\s?
from seqkit.
Related Issues (20)
- Seqkit seq -r -p -t dna of file containing 16bp multiple sequences creates concatenated rev comp sequence. HOT 1
- Default to not removing ‘*’ for seqkit sum of peptides? HOT 2
- `seqkit subseq` with bed file does properly handle uppercase and lowercase accession (not case-sensitive?) HOT 4
- using seqkit locate for k-mer counting HOT 2
- Locate memory usage HOT 2
- Remove reads with certain amount of ambiguous bases HOT 2
- seqkit 2.5.0 reports wrong version number (2.4.0) HOT 2
- Possible bug in seqkit stats HOT 2
- Allow grep to handle pair suffix in ID HOT 2
- Fast way to run seqkit locate HOT 1
- Issue with sequence of length 1 and quality '+' HOT 3
- convert paired-end FASTQ to FASTA and split in one step HOT 3
- Exit status 141 running sample and head HOT 1
- Add average quality score to `stats` HOT 5
- Add subseq selected coordinates to FASTA? HOT 2
- [INFO] read BED file ... [ERRO] chr1: bad start: 144008994
- seqkit common/seqkit grep HOT 3
- How to calculate the length of GC content? HOT 2
- [feature suggestion] Reverse translate protein search expression into nucleotide regex or degenerate base sequence HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from seqkit.