I have a large text-file with tab-delimited genetic data that looks like:
KSC112 KSC234 0 0 1 1 A G C T
I simply wan to delete the first column, but since the file has 600 000 columns, it is not possible with awk (seems to be limited at 32k columns).
Does anyone have an idea how to do this? (2 Replies)
Hi,
I have the below flat filewith ~ as delimiter
emp.no~dept.name
I need to append corresponding emp.name column which will come from database based on emp.no in the flat file.
I need the output as
dept.name~emp.name
Can anyone please help me in resolving this issue..
I tried the... (2 Replies)
I want to add a new column to a tab delimited text file. It will be the first column and it will just be 1's. How do I go about doing that? Thanks! (1 Reply)
Hi all,
I'm new to Unix and work primarily in bioinformatics. I am in need of a script which will allow me to replace "1" with "chr1" in only the first column of a file which looks like such:
1 10327 rs112750067 T C . PASS ASP;RSPOS=10327;... (4 Replies)
I have a file which looks like this:
73450 articles and news developmental psychology 2006-03-30 16:22:40 1 http://www.usnews.com
73450 articles and news developmental psychology 2006-03-30 16:22:40 2 http://www.apa.org
73450 articles and news developmental psychology 2006-03-30... (1 Reply)
Dear All,
I would like to find an automatic way to add a given code which belong to a class at the end of the column , for example this is my input file:
0610009O20Rik
V$VMYB_01 310 (+) 1 0.971 v-Myb
V$EVI1_04 782 (-) 0.763 0.834 Evi-1
V$ELK1_02 1966 (-) 1 0.984 Elk-1... (4 Replies)
Hi,
Can anyone please tell me about how we can delete an entire column from a tab delimited file?
Mu input_file.txt looks like this:
And I want the output as:
I used the below code
nawk -v d="1" 'BEGIN{FS=OFS="\t"}{$d=""}{print}' input_file.txtBut in the output, the first column is... (5 Replies)
Hi,
I have a data like
Input:
12||34|56|78
Output:
XYZ|12||34|56|78
I tried like this , but it puts it on another line
awk -F "|" ' BEGIN {"XYZ"} {print $0} 'file
Any quick suggessitons in sed/awk ? am using HP-UX (3 Replies)
Hello Everyone..
I want to replace the retail col from FileI with cstp1 col from FileP if the strpno matches in both files
FileP.txt
... (2 Replies)
Discussion started by: YogeshG
2 Replies
LEARN ABOUT DEBIAN
cgi::formbuilder::source::yaml
CGI::FormBuilder::Source::YAML(3pm) User Contributed Perl Documentation CGI::FormBuilder::Source::YAML(3pm)NAME
CGI::FormBuilder::Source::YAML - Initialize FormBuilder from YAML file
SYNOPSIS
use CGI::FormBuilder;
my $form = CGI::FormBuilder->new(
source => {
source => 'form.fb',
type => 'YAML',
},
);
my $lname = $form->field('lname'); # like normal
DESCRIPTION
This reads a YAML (YAML::Syck) file that contains FormBuilder config options and returns a hash to be fed to CGI::FormBuilder->new().
Instead of the syntax read by CGI::FormBuilder::Source::File, it uses YAML syntax as read by YAML::Syck. That means you fully specify the
entire data structure.
LoadCode is enabled, so you can use YAML syntax for defining subroutines. This is convenient if you have a function that generates valida-
tion subrefs, for example, I have one that can check profanity using Regexp::Common.
validate:
myfield:
javascript: /^[sS]{2,50}$/
perl: !!perl/code: >-
{ My::Funk::fb_perl_validate({
min => 2,
max => 50,
profanity => 'check'
})->(shift);
}
POST PROCESSING
There are two exceptions to "pure YAML syntax" where this module does some post-processing of the result.
REFERENCES (ala CGI::FormBuilder::Source::File)
You can specify references as string values that start with &, $, @, or \% in the same way you can with CGI::FormBuilder::Source::File.
If you have a full direct package reference, it will look there, otherwise it will traverse up the caller stack and take the first it
finds.
For example, say your code serves multiple sites, and a menu gets different options depending on the server name requested:
# in My::Funk:
our $food_options = {
www.meats.com => [qw( beef chicken horta fish )],
www.veggies.com => [qw( carrot apple quorn radish )],
};
# in source file:
options: @{ $My::Funk::food_options->{ $ENV{SERVER_NAME} } }
EVAL STRINGS
You can specify an eval statement. You could achieve the same example a different way:
options: eval { $My::Funk::food_options->{ $ENV{SERVER_NAME} }; }
The cost either way is about the same -- the string is eval'd.
EXAMPLE
method: GET
header: 0
title: test
name: test
action: /test
submit: test it
linebreaks: 1
required:
- test1
- test2
fields:
- test1
- test2
- test3
- test4
fieldopts:
test1:
type: text
size: 10
maxlength: 32
test2:
type: text
size: 10
maxlength: 32
test3:
type: radio
options:
-
- 1
- Yes
-
- 0
- No
test4:
options: @test4opts
sort: &Someother::Package::sortopts
validate:
test1: /^w{3,10}$/
test2:
javascript: EMAIL
perl: eq 'test@test.foo'
test3:
- 0
- 1
test4: @test4opts
You get the idea. A bit more whitespace, but it works in a standardized way.
METHODS
new()
Normally not used directly; it is called from CGI::FormBuilder. Creates the "CGI::FormBuilder::Source::YAML" object. Arguments from the
'source' hash passed to CGI::FormBuilder->new() will become defaults, unless specified in the file.
parse($source)
Normally not used directly; it is called from CGI::FormBuilder. Parses the specified source file. No fancy params -- just a single file-
name is accepted. If the file isn't acceptable to YAML::Syck, I suppose it will die.
SEE ALSO
CGI::FormBuilder, CGI::FormBuilder::Source
AUTHOR
Copyright (c) 2006 Mark Hedges <hedges@ucsd.edu>. All rights reserved.
LICENSE
This module is free software; you may copy it under terms of the Perl license (GNU General Public License or Artistic License.)
http://www.opensource.org/licenses/index.html
perl v5.8.8 2007-12-09 CGI::FormBuilder::Source::YAML(3pm)