Sponsored Content
Top Forums Shell Programming and Scripting Merge multiple lines in one line Post 302764663 by vgersh99 on Thursday 31st of January 2013 05:56:16 PM
Old 01-31-2013
Code:
awk '/^>/ { print ((FNR==1)?"":ORS) $0;next} {printf $0}' myFile


Last edited by vgersh99; 01-31-2013 at 07:06 PM.. Reason: ooops...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Use sed to merge multiple lines

Hi all: I have a file in which the contents are as following: ... This is a test ONE TWO Hello, world! XXX YYY CCC test again three, four five six seven world AAA BBB QQQ test eight, nine world (3 Replies)
Discussion started by: xb88
3 Replies

2. Shell Programming and Scripting

merge multiple lines from flat file

Hi, I have a tab delimited flat file like this: 189 Guide de lutilisateur sur lappel conférence à trois au moyen d'adaptateurs téléphoniques <TABLE><TBODY><TR><TD><DIV class=subheader>La fonction Appel conférence à trois </DIV></TD> \ <TD><?php print $navTree;?> vous permet de tenir un appel... (4 Replies)
Discussion started by: hnhegde
4 Replies

3. Shell Programming and Scripting

Removing end of line to merge multiple lines

I'm sure this will be an easy question for you experts out there, but I have been searching the forum and working on this for a couple hours now and can't get it right. I have a very messy data file that I am trying to tidy up - one of the issues is some records are split into multiple lines: ... (4 Replies)
Discussion started by: tink
4 Replies

4. Shell Programming and Scripting

merge multi-lines into one line

Hi, Can anyone help me for merge the following multi-line logs( the black lines) which beginning with time: into one line. For the line with "-", it needs to be deleted. Please see the red color line. ######################################### time: 20080817073334 dn: uid=ok,ou=nbt... (3 Replies)
Discussion started by: missyou
3 Replies

5. Shell Programming and Scripting

Using Perl to Merge Multiple Lines in a File

I've hunted and hunted but nothing seems to apply to what I need. Any help will be much appreciated! My input file looks like (Unix): marker,allele1,allele2 RS1002244,1,1 RS1002244,1,3 RS1002244,3,3 RS1003719,2,2 RS1003719,2,4 RS1003719,4,4 Most markers are listed 3 times but a few... (2 Replies)
Discussion started by: Peggy White
2 Replies

6. UNIX for Dummies Questions & Answers

To merge a few lines to 1 line

Hi Experts, This is my input file. input.txt 0 /dev/fd 25 /var 1 /tmp 1 /var/run 1. If this file has single line, then leave it, print the single line else merge the 4 lines above into 1 line as below e.g (6 Replies)
Discussion started by: streddy
6 Replies

7. Shell Programming and Scripting

Merge multiple lines in same file with common key using awk

I've been a Unix admin for nearly 30 years and never learned AWK. I've seen several similar posts here, but haven't been able to adapt the answers to my situation. AWK is so damn cryptic! ;) I have a single file with ~900 lines (CSV list). Each line starts with an ID, but with different stuff... (6 Replies)
Discussion started by: protosd
6 Replies

8. Shell Programming and Scripting

Merge multiple lines to one line when line starts with and ends with

example: comment Now_TB.table column errac is for error messages 1 - first 2 - second 3 -third ; in this example I need to be able to grab the comment as first word and ; as the last word and it might span a few lines. I need it to be put all in one line without line breaks so I can... (4 Replies)
Discussion started by: wambli
4 Replies

9. UNIX for Dummies Questions & Answers

How to merge every n lines into one line?

I want to merge every 16 lines into one line, how can I do that? My file looks like below: 0 . 2 2 . 0 0 . 0 0 . 0 0 . 0 0 0 0 0 (2 Replies)
Discussion started by: ml4me
2 Replies

10. Shell Programming and Scripting

Merge multiple lines into a single line

Hi all, I'm relatively new to scripting, I can do pretty basic things. I have a daily log file that looks like: timestamp=2017-06-28-01.01.35.080576; event status=0; userid=user1; authid=user1; application id=10.10.10.10.11111.12345678901; application name=GUI; ... (29 Replies)
Discussion started by: dwdnet
29 Replies
PRODA(1)																  PRODA(1)

NAME
proda - multiple alignment of protein sequences with repeats and rearrangements SYNOPSIS
proda [option] [mfafile] [> output] DESCRIPTION
This manual page documents briefly the proda command. proda (Protein Domain Aligner) is public domain software for generating multiple alignments of protein sequences with repeats and rearrangements, e.g. proteins with multiple domains. Given a set of protein sequences as input, ProDA first finds local pairwise alignments between all pairs of sequences, then forms blocks of alignable sequence fragments, and finally generates multiple alignments of the blocks. ProDA relies on many techniques used in probcons (<http://probcons.stanford.edu>), a recent multiple aligner that shows high accuracy in a number of popular benchmarks. INPUT FORMAT
Proda accepts input files in the MFA format. The MFA format is specified below: o the MFA format consists of multiple sequences; o each sequence in the MFA format begins with a single-line description, followed by lines of sequence data; o the description line is distinguished from the sequence data by a greater-than (">") symbol in the first column. OUTPUT FORMAT
For a set of input sequences, Proda usually outputs several blocks in turn, each consists of alignable sequence fragments. Each block is followed by its multiple alignment. A block is specified by listing its sequence fragments. Each fragment is output as sequence_name(start-end), where sequence_name is the name of the original sequence and start and end are positions at which the fragment begins and ends respectively. Proda produces block alignments in the ClustalW (ALN) format described below: o the ClustalW format consists of a single header line followed by sequence data in blocks of 50 alignment positions; o each block consists of: o one line of data for each of the sequences in the alignment - in particular, the name of the sequence; o 50 characters of the alignment; o one annotation line indicating fully conserved (*), strongly-conserved (:), or weakly-conserved columns (.); o the description line is distinguished from the sequence data by a greater-than (">") symbol in the first column. FASTA format for output If the -fasta option is specified, then, in addition to regular output, ProDA produces a file containing block alignments in the FASTA format. The output file has the same name as the first input file and extension ".fasta". Two consecutive block alignments are separated by a line containing character '#'. The FASTA format is described below: o the FASTA format consists of all the sequences given in the input files; o each sequence in the FASTA format begins with a single-line description, followed by lines of sequence data; o the description line is distinguished from the sequence data by a greater-than (">") symbol in the first column; o aligned residues are in upper case, unaligned residues are in lower case. Since a final alignment contains each sequence only once, this option should be used only if input sequences do not contain repeats. OPTIONS
-L [min_length] Set minimal alignment length equal to [min_length]. ProDA finds alignments of length greater than or equal to a threshold L. By default, L = 30. This option sets the threshold to [min_length]. -posterior Use posterior decoding when computing local pairwise alignments. ProDA computes local pairwise alignments between two sequences using a pair-HMM and either Viterbi decoding or posterior decoding. The default option is using Viterbi decoding which is faster than posterior decoding but may be less accurate. Turning on this option instructs the aligner to use posterior decoding instead. In the example above, the output was generated with -posterior option turned on. -silent Do not report progress while aligning. Turning on this option instructs the aligner not to report the progress while aligning. By default, ProDA reports the progress on all pairwise alignments, block generation, and on block alignment. Since some stages of the algorithm, especially pairwise alignment, may take long time, reporting progress makes the program look alive while running. -tran Use transitivity when forming blocks of alignable sequence fragments. Two sequence fragments are directly alignable if they are parts of a local pairwise alignment. By default, two fragments are considered alignable if and only if they are directly alignable. Turning on this option instructs the aligner to consider two fragments alignable when they are directly alignable or when both of them are directly alignable to a third fragment. -fasta Use FASTA output format in addition to the ClustalW format. When this option is turned on, the aligner generates output in the FASTA format and stores in a file with the same name as the first input file and extension ".fasta", in addition to the normal output to stdout. This option should be used only if input sequences do not contain repeats. SEE ALSO
probcons(1) AUTHOR
This manual page was written by David Paleino <d.paleino@gmail.com> for the Debian(TM) system (but may be used by others). This man page is released under the same conditions as the software, that is Public Domain. This software has been released in Public Domain by Phuong T.M., Do C.B., Edgar R.C. and Batzoglou S. in "Multiple alignment of protein sequences with repeats and rearrangements", Nucleic Acids Research 2006 - 34(20), 5932-5942 COPYRIGHT
Copyright (C) 2007 David Paleino april 25, 2007 PRODA(1)
All times are GMT -4. The time now is 03:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy