Skip Menu |
 

This queue is for tickets about the Bio-SamTools CPAN distribution.

Report information
The Basics
Id: 87175
Status: new
Priority: 0/
Queue: Bio-SamTools

People
Owner: Nobody in particular
Requestors: bayerlein [...] genomatix.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



From bayerlein [...] genomatix.de Tue Jul 23 06: 23:12 2013
MIME-Version: 1.0
X-Spam-Status: No, score=-6.235 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_SOFTFAIL=0.665] autolearn=ham
X-Spam_score: 0.0
X-Spam-Flag: NO
X-Spam_bar: /
content-type: text/plain; charset="utf-8"; format="flowed"
Message-ID: <51EE5978.9060800 [...] genomatix.de>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -6.235
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 373E8240FB8 for <cpan-bug+Bio-SamTools [...] hipster.bestpractical.com>; Tue, 23 Jul 2013 06:23:12 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i11mXdo-zUGB for <cpan-bug+Bio-SamTools [...] hipster.bestpractical.com>; Tue, 23 Jul 2013 06:23:07 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id A4F70240FA7 for <bug-Bio-SamTools [...] rt.cpan.org>; Tue, 23 Jul 2013 06:23:07 -0400 (EDT)
Received: (qmail 24325 invoked by alias); 23 Jul 2013 10:23:06 -0000
Received: from mail.genomatix.de (HELO mail.genomatix.de) (82.135.24.35) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Tue, 23 Jul 2013 03:22:54 -0700
Received: from teutonic.genomatix.de ([192.168.111.139]:51123) by mail.genomatix.de with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from <bayerlein [...] genomatix.de>) id 1V1Zk0-0008U6-Ai for bug-Bio-SamTools [...] rt.cpan.org; Tue, 23 Jul 2013 12:22:49 +0200
X-Spam_score_int: 0
Delivered-To: cpan-bug+Bio-SamTools [...] hipster.bestpractical.com
Subject: Bio::DB::Sam problems
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20120613 Iceowl/1.0b1 Icedove/3.0.11
Return-Path: <bayerlein [...] genomatix.de>
X-RT-Mail-Extension: bio-samtools
X-Original-To: cpan-bug+Bio-SamTools [...] hipster.bestpractical.com
X-Spam-Check-BY: la.mx.develooper.com
Date: Tue, 23 Jul 2013 12:22:48 +0200
X-Spam-Level:
X-Spam_report:
To: bug-Bio-SamTools [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Markus Bayerlein <bayerlein [...] genomatix.de>
X-RT-Original-Encoding: iso-8859-1
X-RT-Interface: Email
Content-Length: 2969
Download (untitled) / with headers
text/plain 2.8k
Hello. I am using your nice Bio::DB::Sam Perl module to access BAM files to view the data in our Genome Browser. Up to now, the BAM files were uploaded and stored locally on our harddisk. But now I would like to access BAM files remotely via HTTP. I should mention that I do not have the latest version of Bio::DB::Sam installed, but version 1.33 Unfortunately I encounter two problems: 1. When my script is run in taint-mode, it crashes with the error: [SIGDIE] Insecure dependency in chdir while running with -T switch at /usr/lib/perl5/Bio/DB/Sam.pm line 2233. It seems that the return value of the 'getcwd' function you are calling in line 2229 (in sub index_open_in_safewd) is tainted. This is not a critical issue, as I could run the script without the -T switch. 2. The second problem arises from the usage of the File::Spec->tmpdir method. This method returns the same value for each call from within the same program, i.e. it caches the first value it returns, and keeps this value for every other call. This means that changing the temporary directory (by setting $ENV{TMPDIR}) is possible only once in a program. (Even if $ENV{TMPDIR} was not modified, the return value of File::Spec->tmpdir is sticky after the first call to it, meaning that the method will always return '/tmp'.) However, setting $ENVP{TMPDIR} should be possible once per script. But if Bio::DB::Sam is involved, this seems no longer to be true. I tested this with the following Perl code: - use strict; use File::Spec; BEGIN { $ENV{TMPDIR} = '/home/bayerlein'; } use Bio::DB::Sam; print "tmpdir: ", File::Spec->tmpdir, "\n"; -> prints: tmpdir: /home/bayerlein - while this code: - use strict; use File::Spec; use Bio::DB::Sam; $ENV{TMPDIR} = '/home/bayerlein'; print "tmpdir: ", File::Spec->tmpdir, "\n"; -> prints: tmpdir: /tmp - So the modification of $ENV{TMPDIR} is only effective if it is ensured to take place BEFORE Bio::DB::Sam is loaded. Unfortunately, I cannot ensure this in my application. This means that I cannot change the directory where the BAM index file is saved (by 'index_open_in_safewd'). But in my application it is important to decide where to save the index file (to avoid file name conflicts). Do you have any advice how I could bypass this behaviour and force the index to be saved in a specific directory? The only 'solution' I can think of is to modify your code, but I would prefer not to do this (besides any copyright/license infringement this might imply and of course, because I don't know if my changes would work as expected). Kind regards from Munich Markus -- Markus Bayerlein Genomatix Software GmbH phone +49 (0)89 599 766 0 Bayerstrasse 85a FAX +49 (0)89 599 766 55 80335 Munich email bayerlein@genomatix.de Germany WWW http://www.genomatix.de Legal information: HRB 117956 Amtsgericht Muenchen; Tax-ID: DE 189568720 Geschaeftsfuehrer / Managing Director: Klaus May


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.