I have a fasta file with a thousand sequences with a distribution of lengths between 100 and 150bp. I would like to add Ns to all sequences whose length is <150. I know it is possible but thus far I have yet to find anything to easily do this. Please help. Thanks!
Unconfigured Ad
Collapse
X
-
-
Cross-posted:
https://www.biostars.org/p/238635/
Please link other sites when you cross-post, so people don't waste their time answering a question that has already been answered.
-
Not fast, but something like:
Code:perl -e 'while(<>) {if (/^>/) {print;next}; chomp; print $_,"N" x (150-length($_)),"\n"}' in.fasta
Comment
Latest Articles
Collapse
-
by SEQadmin2
NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...-
Channel: Articles
10-30-2026, 06:46 AM -
ad_right_rmr
Collapse
News
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SEQadmin2, 11-17-2026, 06:27 AM
|
0 responses
31 views
0 reactions
|
Last Post
by SEQadmin2
11-17-2026, 06:27 AM
|
||
|
Started by SEQadmin2, 11-12-2026, 07:59 AM
|
0 responses
43 views
0 reactions
|
Last Post
by SEQadmin2
11-12-2026, 07:59 AM
|
||
|
Started by SEQadmin2, 11-05-2026, 09:25 AM
|
0 responses
54 views
0 reactions
|
Last Post
by SEQadmin2
11-05-2026, 09:25 AM
|
||
|
Started by SEQadmin2, 11-03-2026, 11:54 AM
|
0 responses
79 views
0 reactions
|
Last Post
by SEQadmin2
11-03-2026, 11:54 AM
|
Comment