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

Can't use parseBAM.pl for some reason #2

Closed
dorigabay opened this issue Mar 7, 2022 · 8 comments
Closed

Can't use parseBAM.pl for some reason #2

dorigabay opened this issue Mar 7, 2022 · 8 comments

Comments

@dorigabay
Copy link

Hello,
I have been trying to use the code, and couldn't apply it on the example.

it returned:

(Bullseye) [dorg@epitrans Code]$ perl parseBAM.pl --input file.bam --output output.matrix --cpu 4 --minCoverage 10 --removeDuplicates
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "C.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Missing right curly or square bracket at parseBAM.pl line 511, at end of line
syntax error at parseBAM.pl line 511, at EOF
Execution of parseBAM.pl aborted due to compilation errors.

Do you know what should be the problem.

@mflamand
Copy link
Owner

mflamand commented Mar 7, 2022

Hello,
I apologize, I accidentally deleted a curly bracket in an update late last week. I just fixed it. Let me know if you have any other issues!

This will not remove the setting locale warnings which I believe should be harmless. To fix this, you would need to set a language in in your shell, typically by adding it to your .bashrc or .bash_profile.

@dorigabay
Copy link
Author

dorigabay commented Mar 7, 2022 via email

@mflamand
Copy link
Owner

mflamand commented Mar 7, 2022

I think perl v5.24 should be fine.
This says that the MCE::Loop package is missing. It should have been install with MCE.

did you successfully install the required perl packages by running the following:

cpanm Bio::DB::Fasta
cpanm Text::NSP
cpanm Array::IntSpan
cpanm MCE
?

@mflamand
Copy link
Owner

mflamand commented Mar 7, 2022

I have just a fresh install using conda and the provided .yml file and MCE works with no problems. I do get perl version 5.26.2 though. I think you are using the system version of perl, and not the conda version ( you are getting perl from /apps/RH7U2/gnu/perl/5.24.0/lib/5.24.0)

You could try reloading conda as such :
(Bullseye) *@*:~$ conda deactivate
(base) *@*: ~$ conda activate Bullseye

(Bullseye) *@*:~$ which perl
/home/***/miniconda3/envs/Bullseye/bin/perl

you should be able to see that you are running perl from the miniconda path, not the system path

@dorigabay
Copy link
Author

dorigabay commented Mar 10, 2022 via email

@mflamand
Copy link
Owner

Hi Dor,

The way it is currently setup, the annotation file provided with the --annotationFile needs to be a refFlat file. I will soon add more details on this in the readme. This can be obtained from UCSC table browser :

image

Alternative 1: if you have a GTF file, you can convert it using the UCSC utilities ("kentUtils") which can be found here: http://hgdownload.soe.ucsc.edu/admin/exe/.

Alternative 2: If you have a .bed6 file (as I can guess from your command line), you can replace the --annotationFile by --KnownSites. However, using this option will not keep track of the relative position of the site (5'UTR/CDR/3'UTR) and will not allow to look for sites in introns or extended 3'UTRs (unless these are also found in the bed file of course).

@dorigabay
Copy link
Author

dorigabay commented Mar 15, 2022 via email

@mflamand
Copy link
Owner

Hi Dor,

I have never seen this error before. Can you try reading the SRR994070.matrix.gz file directly with tabix to make sure the file is not corrupted?
for example to get the reads on chr10: (replace with chr10 with 10 if your alignment was done on a fasta without "chr")

tabix SRR994070.matrix.gz chr10 | head

The error seems to come from HTSLIB. With the version installed by conda, I have not seen this error. could you verify that you are using the conda version:

which tabix

should return the path to the conda directory

tabix --version

will tell you which htslib version is installed

I don't know how much memory you are providing when running the script, but I would make sure to provide at least 2GB per CPU core.

Please let me know if tabix is running correctly.

@mflamand mflamand closed this as completed Dec 8, 2022
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

No branches or pull requests

2 participants