Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Printing into two files under difference situation Post 302861339 by grace_shen on Tuesday 8th of October 2013 04:26:09 PM
Old 10-08-2013
Printing into two files under difference situation

I want to printing into two files under difference situation.
For example, file 1 name.txt
Code:
>gma-miR172a    Glyma02g28845
>gma-miR1513a-3p        Glyma02g15840
>gma-miR166a-5p Glyma02g15840
>gma-miR1530    Glyma02g15130
>gma-miR1507a   Glyma02g01841

File 2 a.gff
Code:
Glyma01g07930   Glyma02g13330
Glyma01g07390   Glyma02g13120

I want to check each line of file a.gff; if the two element"Glyma01g07930" and "Glyma02g13330" are both existing in file 1, print this line into file a_yes.gff; otherwise print the line into a_no.gff.

However, I have bunch of file 2 to check, like a.gff,b.gff,c.gff.....
How can I do that?
Both linux command line and perl script would be appreciated. Thank you.

Last edited by Scott; 10-09-2013 at 01:13 AM.. Reason: Code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

A Challenging situation for the MODERATORS

Well, I hope this way you will respond to my inquiries. I have 4 unix servers,with static ips (though i dont think this is an issue)....i can telnet and rlogin from one to the other....if i FTP from on et othe other and try to execute : cd /user return /user : no such file or... (1 Reply)
Discussion started by: BAM
1 Replies

2. UNIX for Advanced & Expert Users

current situation

hello..what is the current situation or lastest version of UNIX?? Is there any where i can read more about it?? (2 Replies)
Discussion started by: joanne6298
2 Replies

3. Shell Programming and Scripting

sed situation

Hi, I'm looking for someone who can think in sed. Basically, I need the trailing characters on every line in a file to be deleted. These characters are all in capitals, and always follow a number, but they often vary in number For instance, on the line: 2006_10_9_p20_TALK I'd want to... (4 Replies)
Discussion started by: Laurel Maury
4 Replies

4. Programming

strange situation in file

Hi All, I am writing some data's into a file from C++ program. The files which i am writing is of fixed length . say 232 in length per line. I am writing as . my c code is as ... (0 Replies)
Discussion started by: arunkumar_mca
0 Replies

5. UNIX for Dummies Questions & Answers

help : crisis situation !!

Hi I had deleted important files from my company server :( the server is HPUX and i don't know how to undo rm command or how to restore the files .. iam appreciate for any help Thanx ... (5 Replies)
Discussion started by: Eisa
5 Replies

6. Shell Programming and Scripting

Comparing Columns and printing the difference from a particular file

Gurus, I have one file which is having multiple columns and also this file is not always contain the exact columns; sometimes it contains 5 columns or 12 columns. Now, I need to find the difference from that particular file. Here is the sample file: param1 | 10 | 20 | 30 | param2 | 10 |... (6 Replies)
Discussion started by: buzzusa
6 Replies

7. Shell Programming and Scripting

Columns comparision of two large size files and printing the difference

Hi Experts, My requirement is to compare the second field/column in two files, if the second column is same in both the files then compare the first field. If the first is not matching then print the first and second fields of both the files. first file (a .txt) < 1210018971FF0000,... (6 Replies)
Discussion started by: krao
6 Replies

8. Shell Programming and Scripting

Cat files situation

Hello, I am PhD student (Biomedical sciences) and very new to Linux. I need some help with the following task : I have files in the following format for their names : An_A1_nnn_R1.txt; An_A1_nnm_R1.txt; An_A1_nnoo_R1.txt An_A2_nnn_R1.txt; An_A2_nnm_R1.txt; An_A2_nno_R1.txt ... (8 Replies)
Discussion started by: Julio Finalet
8 Replies

9. Shell Programming and Scripting

Compare line and printing difference

Hi, I want to compare two files and print out their differences e.g: t1.txt a,b,c,d t2.txt a,b,c,d,e,f Output e,f Currently I do this long about way tr ',' '\n' <t1.txt >t1.tmp tr ',' '\n' <t2.txt >t2.tmp diff t1.tmp t2.tmp > t12.tmp I have to this comparison for 100 files, so... (3 Replies)
Discussion started by: wahi80
3 Replies

10. UNIX for Beginners Questions & Answers

Comparing two files and list the difference with common first line content of both files

I have two file as given below which shows the ACL permissions of each file. I need to compare the source file with target file and list down the difference as specified below in required output. Can someone help me on this ? Source File ************* # file: /local/test_1 # owner: own #... (4 Replies)
Discussion started by: sarathy_a35
4 Replies
Bio::Graphics::Glyph::hybrid_plot(3pm)			User Contributed Perl Documentation		    Bio::Graphics::Glyph::hybrid_plot(3pm)

NAME
Bio::Graphics::Glyph::hybrid_plot - An xyplot plot drawing dual graph using data from two wiggle files per track SYNOPSIS
See <Bio::Graphics::Panel> <Bio::Graphics::Glyph> and <Bio::Graphics::Glyph::wiggle_xyplot>. DESCRIPTION
Note that for full functionality this glyph requires Bio::Graphics::Glyph::generic (generic glyph is used for drawing individual matches for small RNA alignments at a high zoom level, specified by semantic zooming in GBrowse conf file) Unlike the regular xyplot, this glyph draws two overlapping graphs using value data in Bio::Graphics::Wiggle file format: track type=wiggle_0 name="Experiment" description="snRNA seq data" visibility=pack viewLimits=-2:2 color=255,0,0 altColor=0,0,255 windowingFunction=mean smoothingWindow=16 2L 400 500 0.5 2L 501 600 0.5 2L 601 700 0.4 2L 701 800 0.1 2L 800 900 0.1 ##gff-version 3 2L Sample_rnaseq rnaseq_wiggle 41 3009 . . . ID=Samlpe_2L;Name=Sample;Note=YourNoteHere;wigfileA=/datadir/track_001.2L.wig;wigfileB=/datadir/track_002.2L.wig The "wigfileA" and "wigfileB" attributes give a relative or absolute pathname to Bio::Graphics::Wiggle format files for two concurrent sets of data. Basically, these wigfiles contain the data on signal intensity (counts) for sequences aligned with genomic regions. In wigfileA these data are additive, so for each sequence region the signal is calculated as a sum of signals from overlapping matches (signal). In wigfileB the signal represents the maximum value among all sequences (signal quality) aligned with the current region so the user can see the difference between accumulated signal from overlapping multiple matches (which may likely be just a noise from products of degradation) and high-quality signal from unique sequences. It is essential that wigfile entries in gff file do not have score, because score used to differentiate between data for dual graph and data for matches (individual features visible at higher magnification). After an update to wiggle_xyplot code colors for dual plot are now hard-coded (blue for signal and orange for signal quality). Alpha channel is also handled by wiggle_xyplot code now. OPTIONS In addition to some of the wiggle_xyplot glyph options, the following options are recognized: Name Value Description ---- ----- ----------- wigfileA path name Path to a Bio::Graphics::Wiggle file for accumulated vales in 10-base bins wigfileB path name Path to a Bio::Graphics::Wiggle file for max values in 10-base bins fasta path name Path to fasta file to enable BigWig drawing u_method method name Use method of [method name] to identify individual features (like alignment matches) to show at high zoom level. By default it is set to 'match' BUGS
Please report them. SEE ALSO
Bio::Graphics::Panel, Bio::Graphics::Glyph, Bio::Graphics::Glyph::arrow, Bio::Graphics::Glyph::cds, Bio::Graphics::Glyph::crossbox, Bio::Graphics::Glyph::diamond, Bio::Graphics::Glyph::dna, Bio::Graphics::Glyph::dot, Bio::Graphics::Glyph::ellipse, Bio::Graphics::Glyph::extending_arrow, Bio::Graphics::Glyph::generic, Bio::Graphics::Glyph::graded_segments, Bio::Graphics::Glyph::heterogeneous_segments, Bio::Graphics::Glyph::line, Bio::Graphics::Glyph::pinsertion, Bio::Graphics::Glyph::primers, Bio::Graphics::Glyph::rndrect, Bio::Graphics::Glyph::segments, Bio::Graphics::Glyph::ruler_arrow, Bio::Graphics::Glyph::toomany, Bio::Graphics::Glyph::transcript, Bio::Graphics::Glyph::transcript2, Bio::Graphics::Glyph::translation, Bio::Graphics::Glyph::allele_tower, Bio::DB::GFF, Bio::SeqI, Bio::SeqFeatureI, Bio::Das, GD AUTHOR
Peter Ruzanov <pruzanov@oicr.on.ca>. Copyright (c) 2008 Ontario Institute for Cancer Research This package and its accompanying libraries is free software; you can redistribute it and/or modify it under the terms of the GPL (either version 1, or at your option, any later version) or the Artistic License 2.0. Refer to LICENSE for the full license text. In addition, please see DISCLAIMER.txt for disclaimers of warranty. perl v5.14.2 2012-02-20 Bio::Graphics::Glyph::hybrid_plot(3pm)
All times are GMT -4. The time now is 01:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy