Hi monks,
I am working on a bioinformatics web program connected with micro RNAs. As input, the user gives me a list of micro RNAs (miRs), and I recognize miR targets (not relevant to my question, but a bit of background is always nice).
The user interface is written in PHP, and the actual work is done in Perl. The input miRs are saved in an input file, which the Perl program parses and processes.
For the past few days, we have been experiencing a strange bug on some of the input. On closer inspection, it seems that this happened when the input has trailing spaces (see input file below).
mmu-miR-704
mmu-miR-219
mmu-miR-145
mmu-miR-29b
mmu-miR-701
mmu-miR-34a
mmu-miR-150
mmu-miR-362
However, the strange thing is, that the space in the end is
not a space. Every regex I try to delete the space doesn't work. Even more,
if ($temp =~ /\s/){
print "Found Space!!\n";
}
doesn't find anything!
I can use different regexes to try and work around this problem, but I would really like to know what this mysterious character is. Any suggestions?
Thanks, Mr Guy (mrguy123)
The Road goes ever on and on
Down from the door where it began.
----Bilbo Baggins
Update: Here is a link to the input. As you can see, a non-core character is indeed at the end of each line. The question is why, and how to get rid of it.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.