Skip to main content
6 votes

How to get strain names/ids contained in a multi FASTA file using seqkit?

The nice thing about seqkit is that the answer is really simple and memorable: seqkit seq -n sequences.fasta This will output a ...
Cornelius Roemer's user avatar
5 votes
Accepted

Keeping DNA sequence after changing FASTA header on command line

The grep, cut, sed pipeline could also be replaced with the following awk command: ...
Steve's user avatar
  • 3,109
4 votes

Searching motifs in sequence and their frequencies

for the second part re-arrange the for m in matches block to : ...
pippo1980's user avatar
  • 1,108
4 votes

How to get strain names/ids contained in a multi FASTA file using seqkit?

You can trivially do this with standard *nix tools. Here are a few options: ...
terdon's user avatar
  • 10.2k
3 votes
Accepted

motif searching in a multi-fasta file

First of all, you can't do this this way. Fasta sequences can, and indeed yours do, span multiple lines so in order to find a pattern, you need to join those lines into one to make sure you don't miss ...
terdon's user avatar
  • 10.2k
3 votes
Accepted

Searching motifs in sequence and their frequencies

The first part appears to be a simple bug if there is no copy/paste error in the code: Original code, ...
M__'s user avatar
  • 12.6k
3 votes

Keeping DNA sequence after changing FASTA header on command line

The problem is in the grep command you're using, which only sends the fasta file headers to the output. Here's my guess at what the commands in your pipeline do: <...
gringer's user avatar
  • 14.3k
2 votes
Accepted

Primer trimming-fasta files

The IUPAC ambiguity codes can be thought of as regular expression character classes. R matches any purine, so [AG], ...
terdon's user avatar
  • 10.2k
2 votes
Accepted

Trim reads 1kb upstream of sequence

Here's one way using biopython. Note that the Seq object has a number of methods that act just like those of a Python string. One of these is the ...
Steve's user avatar
  • 3,109
1 vote

how to search and calculate occurence of certain word (like TAA) in fastafile

Since you tag python, I suggest a simple Biopython solution: ...
Chris_Rands's user avatar
  • 3,948
1 vote
Accepted

finding overlapping motifs to increase length of motif

This is how it managed to give the desired output. ...
thole's user avatar
  • 153
1 vote

motif searching in a multi-fasta file

Read the sequences with Biopython, reverse translate the sequences and the pattern peptides, construct pattern regexes, search (find_matches()) for the patterns for ...
Peter's user avatar
  • 2,634
1 vote

Multifasta protein alignment

4000 isn't much. You'll need to start with an aligner. For aligners the common options are in no particular order: Clustal Omega MAFFT FAMSA Muscle v5 The current one that 'outperforms' the others ...
M__'s user avatar
  • 12.6k
1 vote

How to get strain names/ids contained in a multi FASTA file using seqkit?

Or a bit more verbose ... perl -nle 'push @res, $_ while s/^>//; END {print join "\n",@res}' myfile.fa
M__'s user avatar
  • 12.6k

Only top scored, non community-wiki answers of a minimum length are eligible