Extracting unique values of a column from a feed file
Hi Folks,
I have the below feed file named abc1.txt in which you can see there is a title and below is the respective values in the rows and it is completely pipe delimited file ,.
now this feed files is been generated regularly by a process and is being kept at unix box at the following location /usr/cft/str so finally the file is at /usr/cft/str/abc1.txt
now from the right side you can see there is a column named ADM_ID ,
can you please advise the script or command that will extract the unique ADM_ID and will store those unique ADM_ID in a newly created file the name of the newly created file is Unique_ADM and this file will be stored at the same location .
so the newly created Unique_ADM file will contain the following data that it will extract from the above feed file..
Hi all,
I have a huge csv file with the following format of data,
Num SNPs, 549997
Total SNPs,555352
Num Samples, 157
SNP, SampleID, Allele1, Allele2
A001,AB1,A,A
A002,AB1,A,A
A003,AB1,A,A
...
...
...
I would like to write out a list of unique SNP (column 1). Could you... (3 Replies)
Hi All,
I have a file which is having 3 columns as (string string integer)
a b 1
x y 2
p k 5
y y 4
.....
.....
Question:
I want get the unique value of column 2 in a sorted way(on column 2) and the sum of the 3rd column of the corresponding rows. e.g the above file should return the... (6 Replies)
I have a text file where the second column is a list of numbers going from small to large. I want to extract the rows where the second column is smaller than or equal to 0.0001.
My input:
rs10082730 9e-08 12 46002702
rs2544081 1e-07 12 46015487
rs1425136 1e-06 7 35396742
rs2712590... (1 Reply)
I have a space delimited text file. I want to extract rows where the third column has 0 as a value and write those rows into a new space delimited text file. How do I go about doing that? Thanks! (2 Replies)
I have a file containing data like so:
2012-01-02 GREEN 4
2012-01-02 GREEN 6
2012-01-02 GREEN 7
2012-01-02 BLUE 4
2012-01-02 BLUE 3
2012-01-02 GREEN 4
2012-01-02 RED 4
2012-01-02 RED 8
2012-01-02 GREEN 4
2012-01-02 YELLOW 5
2012-01-02 YELLOW 2
I can't always predict what the... (4 Replies)
Hi all,
I am new to shell script.I need your help to write a shell script.
I need to write a shell script to extract data from a .csv file where columns are ',' separated.
The file has 5 columns having values say column 1,column 2.....column 5 as below along with their valuesm.... (3 Replies)
cat sample.csv
ID,Name,no
1,AAA,1
2,BBB,1
3,AAA,1
4,BBB,1
cut -d',' -f2 sample.csv | sort | uniq
this gives only the 2nd column values
Name
AAA
BBB
How to I get all the columns of CSV along with this? (1 Reply)
Hi would like to ask you guys any advise regarding my problem
I have this kind of data
file.txt
111111111,20
111111111,50
222222222,70
333333333,40
444444444,10
444444444,20
I need to get this
file1.txt
111111111,70
222222222,70
333333333,40
444444444,30
using this code I can... (6 Replies)
Hi All,
Does anyone have any suggestions/examples of how i could show only lines where the first field is not duplicated. If the first field is listed more than once it shouldnt be shown even if the other columns make it unique.
Example file :
876,RIBDA,EC2
876,RIBDH,EX7
877,RIBDF,E28... (4 Replies)
What is an efficient way of counting the number of unique values in a 400 column by 1000 row array and outputting the counts per column, assuming the unique values in the array are:
A, B, C, D
In other words the output should look like: Value COL1 COL2 COL3
A 50 51 52... (16 Replies)
Discussion started by: Geneanalyst
16 Replies
LEARN ABOUT DEBIAN
xml::feed::entry
XML::Feed::Entry(3pm) User Contributed Perl Documentation XML::Feed::Entry(3pm)NAME
XML::Feed::Entry - Entry/item in a syndication feed
SYNOPSIS
## $feed is an XML::Feed object.
for my $entry ($feed->entries) {
print $entry->title, "
", $entry->summary, "
";
}
DESCRIPTION
XML::Feed::Entry represents an entry/item in an XML::Feed syndication feed.
USAGE
XML::Feed::Entry->new($format)
Creates a new XML::Feed::Entry object in the format $format, which should be either RSS or Atom.
$entry->convert($format)
Converts the XML::Feed::Entry object into the $format format, and returns the new object.
$entry->title([ $title ])
The title of the entry.
$entry->base([ $base ])
The url base of the entry.
$entry->link([ $uri ])
The permalink of the entry, in most cases, except in cases where it points instead to an offsite URI referenced in the entry.
$entry->content([ $content ])
An XML::Feed::Content object representing the full entry body, or as much as is available in the feed.
In RSS feeds, this method will look first for <http://purl.org/rss/1.0/modules/content/#encoded> and <http://www.w3.org/1999/xhtml#body>
elements, then fall back to a <description> element.
$entry->summary([ $summary ])
An XML::Feed::Content object representing a short summary of the entry. Possibly.
Since RSS feeds do not have the idea of a summary separate from the entry body, this may not always be what you want. If the entry contains
both a <description> element and another element typically used for the full content of the entry--either http://www.w3.org/1999/xhtml/body
or <http://purl.org/rss/1.0/modules/content/#encoded>--we treat that as the summary. Otherwise, we assume that there isn't a summary, and
return an XML::Feed::Content object with an empty string in the body.
$entry->category([ $category ])
The category in which the entry was posted.
Returns a list of categories if called in array context or the first category if called in scalar context.
WARNING It's possible this API might change to have an add_category instead.
$entry->tags([ $tag ])
A synonym (alias) for category;
$entry->author([ $author ])
The name or email address of the person who posted the entry.
$entry->id([ $id ])
The unique ID of the entry.
$entry->issued([ $issued ])
A DateTime object representing the date and time at which the entry was posted.
If present, $issued should be a DateTime object.
$entry->modified([ $modified ])
A DateTime object representing the last-modified date of the entry.
If present, $modified should be a DateTime object.
$entry->wrap
Take an entry in its native format and turn it into an XML::Feed::Entry object.
$entry->unwrap
Take an XML::Feed::Entry object and turn it into its native format.
AUTHOR & COPYRIGHT
Please see the XML::Feed manpage for author, copyright, and license information.
perl v5.14.2 2012-03-21 XML::Feed::Entry(3pm)