Parsing Read ID's out of a SAM file
1
0
Entering edit mode
8.1 years ago
SaltedPork ▴ 170

I need to get a list of the read ID's from a SAM file. Is anyone aware of any shortcuts to do this before I embark on writing a parser in Perl?

SAM Perl Parsing • 2.9k views
ADD COMMENT
1
Entering edit mode

writing a parser should be the absolute last ditch effort. For any - any - format, there are at least 2-3 parsers out there already.

ADD REPLY
3
Entering edit mode
8.1 years ago

samtools view foo.sam | cut -f 1 would be quick and easy. You could also use grep and cut.

ADD COMMENT
1
Entering edit mode

Followed by | sort | uniq if that is the ultimate aim.

ADD REPLY

Login before adding your answer.

Traffic: 1683 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6