Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated Perl syntax and parse Fasta/q comment #7

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

sestaton
Copy link

I have updated the title (removed the comment about warnings) because the syntax that was generating warnings will no longer compile.

@lh3
Copy link
Owner

lh3 commented Sep 23, 2013

By definition, FASTA/FASTQ names should never contain spaces. In the header line, anything following a space/tab is comment. It is not part of the sequence name.

@sestaton
Copy link
Author

You are correct, I was referring to parsing the comment, which contains the pair information for Illumina 1.8+ data. For example, in the record below,

HWI-ST765:123:D0TEDACXX:5:1101:2872:2088 1:N:0:ATCACG
TTGTCTTCCAGATAATTCCGCTATGTTCAACAAATATGTTAGATTCAAGTTTTT

the pair information is lost by keeping just the name. There are other ways of handling this, such as returning the comment if it exists, but it seems like discarding this information without warning may lead to problems with downstream analyses.

@sestaton
Copy link
Author

The name and comment parsing should follow the specifications now (sorry for the multiple commits). After some thought, I agreed with you on the original pull request (that is, the name should not include the comment, and extra parsing should not be required). An extra variable for the comment is now returned. The usage is,

while (($name, $comm, $seq, $qual) = readfq(\*STDIN, \@aux)) {
.....
}

@sestaton
Copy link
Author

Note that the syntax defined(@array) previously generated warnings, but as of Perl version 5.21.6 this syntax will not compile. Here is what the readfq.pl (from the master branch) script produces now:

$ perl readfq.pl < test.fq
Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at readfq.pl line 8.

Version info:

$ perl -v
This is perl 5, version 21, subversion 6 (v5.21.6) built for x86_64-linux-thread-multi

Copyright 1987-2014, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

@sestaton sestaton changed the title Remove deprecated Perl syntax that was causing warnings and parse Fasta/q comment Remove deprecated Perl syntax and parse Fasta/q comment Nov 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants