Sponsored Content
Top Forums Shell Programming and Scripting Assigning the names from overlapping regions Post 302820893 by Yoda on Thursday 13th of June 2013 03:19:21 PM
Old 06-13-2013
Why apple is not in the output?
Code:
aaa 18 26 cdded apple banana melon  
aaa 10 35 abcde apple  banana grapes melon

I see apple falls under the range 20 to 22 in file1 and this range is in between 18 to 26!
This User Gave Thanks to Yoda For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk: union regions

Hi all, I have difficulty to solve the followign problem. mydata: StartPoint EndPoint 22 55 2222 2230 33 66 44 58 222 240 11 25 22 60 33 45 The union of above... (2 Replies)
Discussion started by: phoeberunner
2 Replies

2. UNIX for Dummies Questions & Answers

finding overlapping names in different txt files

Dear Gurus, I have 57 tab-delimited different text files, each one containing entries in 3 columns. The first column in each file contains names of objects. Some names are present in more than one file. I would like to find those names and store them in a separate text file, preferably with a... (6 Replies)
Discussion started by: Unilearn
6 Replies

3. UNIX for Dummies Questions & Answers

extract regions of file based on start and end position

Hi, I have a file1 of many long sequences, each preceded by a unique header line. file2 is 3-columns list: headers name, start position, end position. I'd like to extract the sequence region of file1 specified in file2. Based on a post elsewhere, I found the code: awk... (2 Replies)
Discussion started by: pathunkathunk
2 Replies

4. Forum Support Area for Unregistered Users & Account Problems

Trouble Registering? Countries or Regions Abusing Forums

The forums have been seeing a sharp increase in spam bots, forum robots, and malicious registrations from certain countries. If you have been directed to this thread due to a "No Permission Error" when trying to register please post in this thread and request permission to register, including... (1 Reply)
Discussion started by: Neo
1 Replies

5. Shell Programming and Scripting

Obtain the names of the flanking regions

Hi I have 2 files; usually the end position in the file1 is the start position in the file2 and the end position in file2 will be the start position in file1 (flanks) file1 Id start end aaa1 0 3000070 aaa1 3095270 3095341 aaa1 3100822 3100894 aaa1 ... (1 Reply)
Discussion started by: anurupa777
1 Replies

6. Shell Programming and Scripting

Identify the overlapping and non overlapping regions

file1 chr pos1 pos2 pos3 pos4 1)chr1 1000 2000 3000 4000 2)chr1 1380 1480 6800 7800 3)chr1 6700 7700 1200 2200 4)chr2 8500 9500 5670 6670 file2 chr pos1 pos2 pos3 pos4 1)chr2 8500 9500 5000 6000 2)chr1 6700 7700 1200 2200 3)chr1 1380 1480 6700 7700 4)chr1 1000 2000 4900 5900 I... (2 Replies)
Discussion started by: data_miner
2 Replies

7. Shell Programming and Scripting

Extraction of upstream and downstream regions from long sequence file

Hello, here I am posting my query again with modified data input files. see my query is : i have two input files file1 and file2. file1 is smalldata.fasta >gi|546671471|gb|AWWX01449637.1| Bubalus bubalis breed Mediterranean WGS:AWWX01:contig449636, whole genome shotgun sequence... (20 Replies)
Discussion started by: harpreetmanku04
20 Replies

8. UNIX for Dummies Questions & Answers

Retrieving names of files in a dir without overlapping

Hi, I have been trying to retrieve the names of files present in a directory one by one but the names of files are getting overlapped on one another. I tried the below command. ls -1 > filename please help me in getting the file names line by line without overlapping. I am using korn... (6 Replies)
Discussion started by: Pradhikshan
6 Replies

9. Shell Programming and Scripting

Extract Big and continuous regions

Hi all, I have a file like this I want to extract only those regions which are big and continous chr1 3280000 3440000 chr1 3440000 3920000 chr1 3600000 3920000 # region coming within the 3440000 3920000. so i don't want it to be printed in output chr1 3920000 4800000 chr1 ... (2 Replies)
Discussion started by: amrutha_sastry
2 Replies
pr(1)							      General Commands Manual							     pr(1)

Name
       pr - print files

Syntax
       pr [ options ] [ files ]

Description
       The  command  prints  the  named files on the standard output.  If file is designated by a minus sign (-), or if no files are specified the
       command assumes standard input.	By default, the listing is separated into pages, each headed by the page number, a date and time, and  the
       name of the file.

       By default, columns are of equal width, separated by at least one space.  Lines that do not fit are truncated. However, if the -s option is
       used, lines are not truncated and columns are separated by the separation character.

       If the standard output is associated with a terminal, error messages are withheld until has finished printing.

Options
       The following options can be used singly or in combination:

       -a      Prints multi-column output across the page.

       -b      Prints blank headers.

       -d      Double-spaces the output.

       -eck    Expands input tabs to character positions k+1, 2*k+1, 3*k+1,... n*k+1.  If k is 0 or is omitted, tabs are set at every eighth posi-
	       tion.  Tab characters in the input are expanded into the appropriate number of spaces.  The default for c (any non-digit character)
	       is the tab character; therefore, if c is given, it is treated as the input tab character.

       -f      Uses form-feed character for new pages.	The default is to use a sequence of line-feeds.  The -f option causes the command to pause
	       before beginning the first page if the standard output is associated with a terminal.

       -h      Uses the next argument as the header to be printed instead of the file name.

       -ick    Replaces  white space in output by inserting tabs to character positions k+1, 2*k+1, 3*k+1,...n*k+1.  If k is 0 or is omitted, tabs
	       are set at every eighth position.  The default for c (any non-digit character) is the tab character; therefore, if c is	given,	it
	       is treated as the input tab character.

       +k      Begins printing with page k (default is 1).

       -k      Produces k-column output (default is 1).  The -e and -i options are assumed for multi-column output.

       -lk     Sets the length of a page to k lines.  The default is 66 lines.

       -m      Merges and prints all files simultaneously, one per column (overrides the -k, and -a options).

       -nck    Numbers	lines.	The default for k is 20.  The number occupies the first k+1 character positions of each column of normal output or
	       each line of -m output.	If c, which is any non-digit character is given, it is appended to the line number  to	separate  it  from
	       whatever follows.  The default for c is a tab.

       -ok     Offsets	each line by k character positions (default is 0).  The number of character positions per line is the sum of the width and
	       offset.

       -p      Pauses before beginning each page if the output is directed to a terminal.  The command rings the bell at the terminal and awaits a
	       carriage return.

       -r      Suppresses diagnostic reports on failure to open files.

       -sc     Separates columns by the single character c instead of by the appropriate number of spaces (default for c is a tab).

       -t      Suppresses  the	five-line  identifying header and the five-line trailer normally supplied for each page.  The -t option causes the
	       command to quit printing after the last line of each file without spacing to the end of the page.

       -wk     Sets the width of a line to k character positions.  The default is 72 for equal-width multi-column output; otherwise  there  is	no
	       limit.

Examples
       Print file1 and file2 as a double-spaced, three-column listing with the heading:  file list.
       pr -3dh "file list" file1 file2
       Write file1 on file2, expanding tabs to columns 10, 19, 28, 37,...:
       pr -e9 -t <file1>file2

Files
       /dev/tty* to suspend messages

See Also
       cat(1)

																	     pr(1)
All times are GMT -4. The time now is 03:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy