There are no arrays involved here. I tested it on a dummy file that has 250,000 "FASTA Headers" and 4 lines under each FASTA header. So that's 1,250,000 lines in all.
The Perl script, when run on this file, and redirected to another file, takes roughly 5 seconds on my system.
Hi,
I'm not very familiar with unix shell. I want to replace the combination of two carriage returns and one newline with one carriage return and one newline. I think the best way to do this is to use sed. I tried something like this:
sed -e "s#\#\#g" file.txt
but it doesn't work.
Thanx... (2 Replies)
I am trying to use sed to replace specific characters at a specific position in the file with a different value... can this be done?
Example:
File:
A0199999123
A0199999124
A0199999125
Need to replace 99999 in positions 3-7 with 88888.
Any help is appreciated. (5 Replies)
Greetings.
I don't have experience programing scripts. I need to insert a string in a specific position of another string on another file (last.cfg), for example:
File last.cfg before using script:
login_interval=1800
lcs.machinename=client04
File last.cfg after using script:... (4 Replies)
I want to remove text from nth position to nth position couple of times in same line
my line is
"hello is there anyone can help me with this question"
I need like this
ello is there anyone can help me with question
'h' is removed and 'this' removed from the line. I want to do this... (5 Replies)
I woud like to substitue a string on a specific position for specific lines
I've got a file and I would like to change a specific string from "TOCHANGE" to "ABCABCAB"
For every line (except 1,2, 3 and the last one) , I need to check between the 9th and the 16th digits.
For the 3rd line, I... (7 Replies)
Hi,
I have file with lines key=val.
For ex(conf.file):-
c=3
ef=78
b=40
ca=40
I want to remove the line with c=3, when I execute the below command it's removing both lines i.e c=3 and ca=40. Could you please correct my command.
/usr/xpg4/bin/awk -v key=c 'match($0,key)... (3 Replies)
I have a file that I need to parse using a script. The dates in the file are displayed in the format:
Mar 2, 2011 9:09:31 PM
I have tried using the date command %e and %l but it pads an extra space for the day and hour if they are single digits.
So this I used a normal date command:
... (6 Replies)
Hi Gurus,
Apologies as I feel like this must be answered already on here somewhere but I just can't find it. I find many people looking to remove all \n and \r (CR and LF) or one or the other but the only times I've found someone trying to remove them only when both are together they've found... (7 Replies)
Hi,
I have a fixed width file.
The way this file works is say for example there are 30 columns in it each with different sizes say 10,5,2, etc...
If data in a field is less than the field size the rest of it is loaded with spaces.
I would like an awk command to that would replace
I have... (8 Replies)
Hi,
I have a file like this (about 8 columns in total, this being the 2nd column)
gi_49482297_ref_YP_039521.1_
gi_49482297_ref_YP_039521.1_
gi_49482315_ref_YP_039539.1_
gi_49482315_ref_YP_039539.1_I want to remove the _ at the end of the line.
And at later stages I would want to replace the... (5 Replies)
Discussion started by: Syeda Sumayya
5 Replies
LEARN ABOUT DEBIAN
fasta_formatter
FASTA_FORMATTER(1) User Commands FASTA_FORMATTER(1)NAME
fasta_formatter - changes the width of sequences line in a FASTA file
DESCRIPTION
usage: fasta_formatter [-h] [-i INFILE] [-o OUTFILE] [-w N] [-t] [-e] Part of FASTX Toolkit 0.0.13.2 by gordon@cshl.edu
[-h] = This helpful help screen.
[-i INFILE]
= FASTA/Q input file. default is STDIN.
[-o OUTFILE] = FASTA/Q output file. default is STDOUT. [-w N] = max. sequence line width for output FASTA file.
When ZERO (the default), sequence lines will NOT be wrapped - all nucleotides of each sequences will appear on a single line (good
for scripting).
[-t] = Output tabulated format (instead of FASTA format).
Sequence-Identifiers will be on first column, Nucleotides will appear on second column (as single line).
[-e] = Output empty sequences (default is to discard them).
Empty sequences are ones who have only a sequence identifier, but not actual nucleotides.
Input Example:
>MY-ID AAAAAGGGGG CCCCCTTTTT AGCTN
Output example with unlimited line width [-w 0]:
>MY-ID AAAAAGGGGGCCCCCTTTTTAGCTN
Output example with max. line width=7 [-w 7]:
>MY-ID AAAAAGG GGGTTTT TCCCCCA GCTN
Output example with tabular output [-t]:
MY-ID AAAAAGGGGGCCCCCTTTTAGCTN
example of empty sequence: (will be discarded unless [-e] is used)
>REGULAR-SEQUENCE-1 AAAGGGTTTCCC >EMPTY-SEQUENCE >REGULAR-SEQUENCE-2 AAGTAGTAGTAGTAGT GTATTTTATAT
SEE ALSO
The quality of this automatically generated manpage might be insufficient. It is suggested to visit
http://hannonlab.cshl.edu/fastx_toolkit/commandline.html
to get a better layout as well as an overview about connected FASTX tools.
fasta_formatter 0.0.13.2 May 2012 FASTA_FORMATTER(1)