reading information from a table and apply a command on multiple files
Hey gyuz,
I wanna calculate the number of mapped reads of a bam file in a region of interest. I used this code to do so :
This will store all the reads from given bam file within the region of interest in region1.txt
Now I have several bam files and several regions for each which are different. (regions are not the same in all bam files)
I prepared a list of them like below:
bam1 region1
bam1 region2
bam1 region3
bam2 region4
bam2 region4
bam3 region5
I want the script to read from the table and apply the function on proper bam file and regions and report the output for each region in a single file. region1.txt, region2.txt, region3.txt,.....
If you can help me with this you saved my time so much!!
Hi all,
Can you please help me in this aspect. I devoloped a FTP script to copy a directory to remote server. Now i got stuck-up in changing the file permissions for all the files in directory. I tried to change the permissions of single file and I did it but failed in changing... (3 Replies)
Hi everyone!!
I have a database table, which has file_name as one of its fields.
Example:
File_ID File_Name Directory Size
0001 UNO_1232 /apps/opt 234
0002 UNO_1234 /apps/opt 788
0003 UNO_1235 /apps/opt 897
0004 UNO_1236 /apps/opt 568
I have to... (3 Replies)
Hi All,
I am using the awk command to replace ',' by '\t' (tabs) in a csv file. I would like to apply this to all .csv files in a directory and create .txt files with the tabs.
How would I do this in a script?
I have the following script called "csvtabs":
awk 'BEGIN {
FS... (4 Replies)
Hi,
I have a bunch of records within a directory where each one has this form:
(example file1)
1 2 50 90 80 90 43512 98 0909 79869 -9 7878 33222 8787 9090 89898 7878 8989 7878 6767 89 89 78676 9898 000 7878 5656 5454 5454
and i want for all of these files to be... (3 Replies)
Hello there,
I am trying to extract (string) information ( a list words) from 4 files and then put the results into 1 file. Currently I am doing this using grep -f list.txt file1 . and repeat the process for the other 3 files. The reasons i am doing that (a) I do know how to code (b) each file... (4 Replies)
Hi ,
I have searched through the forum but not able to find out any help :(
i have a directory having lot of files which contains sql statemtns
eg : file 1 contains
select from table_name1 where .....................
select from
table_name2 where ..........
select
from ... (3 Replies)
hi everyone,
im stuck in here with shell :) can you help me??
i have a directory with alot files (genbank files ... all ended in .gbk ) more than 1000 for sure ... and i want to read each one of them and search for some information and if i found the right one i save in new file with new... (6 Replies)
Hi,
I need to load data from two files to a single table.
My requirement is that I get two files in which a few column data are manadatory.
These files are identified based on the file name.
For example, I have two files ABCFile and BCDFile. ABCFile has mandatory data in column 3 and 4... (0 Replies)
Hi all!
I have this command
grep -E '^\To: |^\Date: |^\Subject: ' fileA.txt > fileA_1.txt && grep -v '^\To: |^\Date: |^\Subject: ' fileA.txt >> fileA_1.txt && rm fileA.txt && sed -i -e 's/\(Date: \|Subject: \|To: \)//g' fileA_1.txtHow do I apply it to all the files in the folder (each file has a... (7 Replies)
Hi ,
Can any please help the below requirement on all multiple servers and multiple dbs.
update configuration set value='yes' ;1)
the above statement apply on 31 Databases at a time on different Ip address
eg : 10.104.1.12 (unix ip address )
the above ip box contains 4 db's eg : db... (2 Replies)
Discussion started by: venkat918
2 Replies
LEARN ABOUT DEBIAN
gtk2::gdk::region
Gtk2::Gdk::Region(3pm) User Contributed Perl Documentation Gtk2::Gdk::Region(3pm)NAME
Gtk2::Gdk::Region - wrapper for GdkRegion
HIERARCHY
Glib::Boxed
+----Gtk2::Gdk::Region
METHODS
region = Gtk2::Gdk::Region->new
rectangle = $region->get_clipbox
boolean = $region->empty
boolean = $region1->equal ($region2)
o $region2 (Gtk2::Gdk::Region)
$source1->intersect ($source2)
o $source2 (Gtk2::Gdk::Region)
$region->offset ($dx, $dy)
o $dx (integer)
o $dy (integer)
boolean = $region->point_in ($x, $y)
o $x (integer)
o $y (integer)
region = Gtk2::Gdk::Region->polygon ($points_ref, $fill_rule)
o $points_ref (scalar)
o $fill_rule (Gtk2::Gdk::FillRule)
boolean = $region->rect_equal ($rectangle)
o $rectangle (Gtk2::Gdk::Rectangle)
Since: gtk+ 2.18
overlaptype = $region->rect_in ($rect)
o $rect (Gtk2::Gdk::Rectangle)
region = Gtk2::Gdk::Region->rectangle ($rectangle)
o $rectangle (Gtk2::Gdk::Rectangle)
list = $region->get_rectangles
Returns a list of rectangles (Gtk2::Gdk::Rectangle's), the area covered by the region.
$region->shrink ($dx, $dy)
o $dx (integer)
o $dy (integer)
$region->spans_intersect_foreach ($spans_ref, $sorted, $func, $data=undef)
o $spans_ref (scalar) arrayref of triples [$x1,$y1,$width1, $x2,$y2,$width2, ...]
o $sorted (boolean)
o $func (scalar)
o $data (scalar)
Call $function for horizontal lines which intersect $region.
$spans_ref is an arrayref of x,y,width horizontal lines. If $sorted is true then they're assumed to be sorted by increasing y coordinate
(allowing a single pass across the region rectangles). $function is called
&$function ($x, $y, $width, $data)
for each portion of a span which intersects $region. $function must not change $region.
$region->spans_intersect_foreach ([ 0,0,50, 20,20,100, 0,10,50 ],
0, # spans not sorted by y
&my_callback,
'hello'); # userdata
sub my_callback {
my ($x, $y, $width, $userdata) = @_;
print "$userdata: $x, $y, $width
";
}
$source1->subtract ($source2)
o $source2 (Gtk2::Gdk::Region)
$source1->union ($source2)
o $source2 (Gtk2::Gdk::Region)
$region->union_with_rect ($rect)
o $rect (Gtk2::Gdk::Rectangle)
$source1->xor ($source2)
o $source2 (Gtk2::Gdk::Region)
ENUMS AND FLAGS
enum Gtk2::Gdk::FillRule
o 'even-odd-rule' / 'GDK_EVEN_ODD_RULE'
o 'winding-rule' / 'GDK_WINDING_RULE'
enum Gtk2::Gdk::OverlapType
o 'in' / 'GDK_OVERLAP_RECTANGLE_IN'
o 'out' / 'GDK_OVERLAP_RECTANGLE_OUT'
o 'part' / 'GDK_OVERLAP_RECTANGLE_PART'
SEE ALSO
Gtk2, Glib::Boxed
COPYRIGHT
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
perl v5.14.2 2012-05-27 Gtk2::Gdk::Region(3pm)