Sponsored Content
Full Discussion: Data parsing
Top Forums Shell Programming and Scripting Data parsing Post 302560419 by Lucky Ali on Thursday 29th of September 2011 07:36:42 PM
Old 09-29-2011
Data parsing

Hi,
I do have a data file which is divided into compartments by ---------. I would like to extract (parse) some of the data and numbers either using awk or sed
The file has the format:
Code:
[CGT]CATGC[AT]

Best GO enrichment: 

Genes/ORF that have the motifs (genes are sorted by max(pa+pd+po)):

A1_1100
  Expression: 103

  Position	 pa	 pd	 po
      -313	5.3	0.0	0.0	tgctttggctGCATGCAttttttatat
      -286	5.3	0.0	0.0	atgcaaaattGCATGCAacgcatgcag
      -277	5.3	0.0	0.0	tgcatgcaacGCATGCAgattttacat
      -314	5.3	0.0	0.0	ttgctttggcTGCATGCattttttata
      -287	5.3	0.0	0.0	tatgcaaaatTGCATGCaacgcatgca

A1_3110
  Expression: 103

  Position	 pa	 pd	 po
      -382	5.3	0.0	0.0	aataataattGCATGCAtgcaattttt
      -104	5.3	0.0	0.0	taccgtcactGCATGCAttacgtgttt
      -383	5.3	0.0	0.0	gaataataatTGCATGCatgcaatttt
      -105	5.3	0.0	0.0	ataccgtcacTGCATGCattacgtgtt

A1_1690
  Expression: 44

  Position	 pa	 pd	 po
      -274	4.8	0.0	0.0	ttaactagttGCATGCAtgaaagaaag
      -275	4.8	0.0	0.0	tttaactagtTGCATGCatgaaagaaa
      -239	4.8	0.0	0.0	aataaatgatTGCATGCgactagaata
---------------------------------------------------------------------------

CC[CT]CAC.

Best GO enrichment: 

Genes/ORF that have the motifs (genes are sorted by max(pa+pd+po)):

A1_2970
  Expression: 38

  Position	 pa	 pd	 po
      -315	2.7	0.0	1.1	ttttggacgcAGTGAGGattaaaatat

A1_3030
  Expression: 38

  Position	 pa	 pd	 po
       -57	2.7	0.0	1.1	aaacgggaaaAGTGAGGaataaatgag
---------------------------------------------------------------------------
.TTCCA.

Best GO enrichment: 

Genes/ORF that have the motifs (genes are sorted by max(pa+pd+po)):

A3_3490
  Expression: 104

  Position	 pa	 pd	 po
      -210	2.7	0.0	0.0	tttaactgaaTTTCCAAttttagttac

A3_880
  Expression: 104

  Position	 pa	 pd	 po
      -245	2.7	0.0	0.0	aaccctattaTTTCCAAatataaaatc
      -317	2.7	0.0	0.0	aaagttgaagCTGGAACactcaaatat
---------------------------------------------------------------------------

What I need to be parsed out is a file with the following format.

Code:
[CGT]CATGC[AT]
A1_1100 103
A1_3110 103
A1_1690 44

CC[CT]CAC.
A1_2970 38
A1_3030 38

.TTCCA.

A3_3490 104
A3_880 104

Please let me know.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parsing the data in a file

Hi, I have file (FILE.tmp) having contents, FILE.tmp ======== filename=menudata records=0000000000037 ldbname=pinsys timestamp=2005/05/14-18:32:33 I want to parse it bring a new file which will look like, filename records ldbname timestamp... (2 Replies)
Discussion started by: Omkumar
2 Replies

2. Shell Programming and Scripting

Parsing the data

Hi I need to parse the following data using shell script Table ----- stage4n_abc 48 stage4o_abcd 4 adashpg_abc_HeartBeat 1 stage4l_asc 168 Can anyone gimme the solution. I want each value to get stored in an array or variable and want the value to be greped from another file.... (1 Reply)
Discussion started by: Archana.Dheepan
1 Replies

3. Shell Programming and Scripting

More efficent Data Parsing

I am looking for a way to parse out some numbers from text. This is an excerpt from a larger script that I am trying to make run a little smoother. Specifically this script is used to Capture DV video streams on a linux machine from the terminal. The setup does 6 streams at once, and this part... (3 Replies)
Discussion started by: Starcast
3 Replies

4. Shell Programming and Scripting

Parsing data

Hi all , I have a file with billing CDR records in it. I need to parse that information (row format) . The purpose is to compare full content. The example I have given below is a single line record but it has two portions, (1) the line start with “!” and end with “1.2.1.8” and (2) second part... (5 Replies)
Discussion started by: jaygamini
5 Replies

5. Shell Programming and Scripting

Parsing the data

Hi friends, I need to parse the following data in the given format and get the desired output. I need a function, which takes the input as a parameter and the desired output will be returned from the function. INPUT(single parameter as complete string) A;BCF;DFG;FD ... (3 Replies)
Discussion started by: sumesh.1988
3 Replies

6. Shell Programming and Scripting

Help in Parsing data

I have below string Transaction_ID:SDP-DM-151204679 , Transaction_DateTime:2011-02-11 00:00:15 GMT+05:30 , Transaction_Mode:WAP , Circle_ID:4 , Circle_Name:BJ ,Zone: , CustomerID:B_31563486 , MSISDN:7870904329 , IMSI:405876122068099 , IMEI: , Sub_Profile:Pre-Paid , CPID:Nazara , CPNAME:Nazara ,... (6 Replies)
Discussion started by: poweroflinux
6 Replies

7. Shell Programming and Scripting

Help with parsing data with awk , eliminating unwanted data

Experts , Below is the data: --- Physical volumes --- PV Name /dev/dsk/c1t2d0 VG Name /dev/vg00 PV Status available Allocatable yes VGDA 2 Cur LV 8 PE Size (Mbytes) 8 Total PE 4350 Free PE 2036 Allocated PE 2314 Stale PE 0 IO Timeout (Seconds) default --- Physical volumes ---... (5 Replies)
Discussion started by: rveri
5 Replies

8. Shell Programming and Scripting

Parsing file data

Hey Guys, I'm a novice at shell scripts and i need some help parsing file data. Basically, I want to write a script that retrieves URLs. Here is what I have so far. #!/bin/bash echo "Please enter start date (format: yyyy-mm-dd):\c" read STARTDATE echo "Please enter end date... (7 Replies)
Discussion started by: silverdust
7 Replies

9. Shell Programming and Scripting

Parsing XML (and insert data) then output data (bash / Solaris)

Hi folks I have a script I wrote that basically parses a bunch of config and xml files works out were to add in the new content then spits out the data into a new file. It all works - apart from the xml and config file format in the new file with XML files the original XML (that ends up in... (2 Replies)
Discussion started by: dfinch
2 Replies

10. Shell Programming and Scripting

Parsing Bulk Data

Hi All, :D Actullay I am looking for a smart way :b: to parse files in a directory whose count is around 2000000 :eek: in a single day. Find is working with me but taking a lot of times :confused:, sometimes even a day which is not helping me.:wall: So anyone can help me know a smart... (5 Replies)
Discussion started by: jojo123
5 Replies
XtConfigureWidget(3Xt)						     MIT X11R4						    XtConfigureWidget(3Xt)

Name
       XtConfigureWidget, XtMoveWidget, XtResizeWidget - move and resize widgets

Syntax
       void XtConfigureWidget(w, x, y, width, height, border_width)
	  Widget w;
	  Position x;
	  Position y;
	  Dimension width;
	  Dimension height;
	  Dimension border_width;

       void XtMoveWidget(w, x, y)
	  Widget w;
	  Position x;
	  Position y;

       void XtResizeWidget(w, width, height, border_width)
	  Widget w;
	  Dimension width;
	  Dimension height;
	  Dimension border_width;

       void XtResizeWindow(w)
	  Widget w;

Arguments
       width
       height
       border_width
		 Specify the new widget size.

       w	 Specifies the widget.

       x
       y	 Specify the new widget x and y coordinates.

Description
       The function returns immediately if the specified geometry fields are the same as the old values.  Otherwise, writes the new x, y, width,
       height, and border_width values into the widget and, if the widget is realized, makes an Xlib call on the widget's window.

       If either the new width or height is different from its old value, calls the widget's resize procedure to notify it of the size change;
       otherwise, it simply returns.

       The function returns immediately if the specified geometry fields are the same as the old values.  Otherwise, writes the new x and y values
       into the widget and, if the widget is realized, issues an Xlib call on the widget's window.

       The function returns immediately if the specified geometry fields are the same as the old values.  Otherwise, writes the new width, height,
       and border_width values into the widget and, if the widget is realized, issues an call on the widget's window.

       If the new width or height are different from the old values, calls the widget's resize procedure to notify it of the size change.

       The function calls the Xlib function to make the window of the specified widget match its width, height, and border width.  This request is
       done unconditionally because there is no way to tell if these values match the current values.  Note that the widget's resize procedure is
       not called.

       There are very few times to use instead, you should use

See Also
       XtMakeGeometryRequest(3Xt), XtQueryGeometry(3Xt)
       X Window System Toolkit: The Complete Programmer's Guide and Specification, Paul J. Asente and Ralph Swick
       X Window System: The Complete Reference, Second Edition, Robert W. Scheifler and James Gettys

															    XtConfigureWidget(3Xt)
All times are GMT -4. The time now is 11:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy