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

Empty Files: counts.gz and pos.gz ::::: v0.935 || v0.939 #520

Closed
g-pacheco opened this issue Sep 15, 2022 · 9 comments · Fixed by #533
Closed

Empty Files: counts.gz and pos.gz ::::: v0.935 || v0.939 #520

g-pacheco opened this issue Sep 15, 2022 · 9 comments · Fixed by #533

Comments

@g-pacheco
Copy link

Hello all,

I am trying to calculate the Global Depth across all my samples with the following command:

N_IND=`cat FPG--GoodSamples.list | wc -l`
angsd -nThreads 2 -ref REF.fasta -bam FPG--GoodSamples.list -sites SITES.pos -rf REFLargeScaffolds.id -remove_bads 1 -uniqueOnly 1 -baq 1 -C 50 -minMapQ 20 -minQ 20 -minInd $((N_IND*95/100)) -maxDepth $((N_IND*1000)) -doCounts 1 -dumpCounts 2 -out FPG--GoodSamples.depth

This command works for version 0.921 but not for versions 0.935 and 0.939 (the outputs are written but they only contain their respective headers). Did the way of calculating Global Depth change in these last versions? I do not seem to get any error message so it is difficult to understand what could be happening.

Many thanks in advance, George.

@g-pacheco
Copy link
Author

Hej @ANGSD,

May I ask if you have had the time to maybe take a look into this?

Much appreciated, George.

@g-pacheco
Copy link
Author

Hello @isinaltinkaya,

May I ask if you would have any thoughts here as well? Actually, this odd behaviour is the reason why I was trying to install the ANGSD myself.

Thanks a lot, George.

@isinaltinkaya
Copy link
Collaborator

Hi @g-pacheco,

I think this is related to #405. I would recommend you use 0.921 for performing this specific task for now until this has been investigated.

Could you please provide a minimal working example with a subset of the data you are using so I can reproduce the issue?

Best wishes,
Isin

@isinaltinkaya
Copy link
Collaborator

Hi @g-pacheco,

Can you try re-building angsd using

make clean; make CPPFLAGS=""

then running the commands?

@g-pacheco
Copy link
Author

Hello @isinaltinkaya,

I am sorry, but I could not try the command make clean; make CPPFLAGS="" due to permission limitations. I have sent you by email the required files to run a test with the following command:

N_IND=`cat FPG--Lists/FPG--GoodSamples_ANGSD.list | wc -l`
angsd -ref DanishTumbler_Dovetail_ReRun.fasta -bam FPG--Lists/FPG--GoodSamples_ANGSD.list -sites PBGP_FinalRun.EcoT22I_Extended_Merged_RemovedPossibleParalogs-g800.pos -rf DanishTumbler_Dovetail_ReRun_ChrGreater1kb.id -remove_bads 1 -uniqueOnly 1 -baq 1 -C 50 -minMapQ 20 -minQ 20 -minInd $((N_IND*50/100)) -maxDepth $((N_IND*1000)) -doCounts 1 -dumpCounts 2 -out FPG--GoodSamples_ANGSD.depth

Thanks a lot, George.

@isinaltinkaya
Copy link
Collaborator

Hi George,

I replicated this issue and I can confirm that it is due to the bug reported in #527.

Therefore I would recommend

  1. either use the old angsd build you mentioned that is already on your system,
    or
  2. build angsd for your user using the following commands: (does not require sudo)
git clone git@github.com:ANGSD/angsd.git; cd angsd; make CPPFLAGS="";

Please feel free to reopen the issue if you experience further issues regarding this.
Best wishes,
Isin

@g-pacheco
Copy link
Author

Hello Işın,

Thanks a lot for your swift reply.
I believe I will stick with the v0.921 then. I just would like to report that I get the following error when trying to run the command you suggested:

git clone git@github.com:ANGSD/angsd.git; cd angsd; make CPPFLAGS="";
Cloning into 'angsd'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
-bash: cd: angsd: No such file or directory
make: *** No targets specified and no makefile found.  Stop.

Best regards, George.

@isinaltinkaya
Copy link
Collaborator

isinaltinkaya commented Oct 10, 2022

Hi George,

This is probably due to not having a public key set; for which I would recommend following the steps in this post.

But for an easy fix, you can just replace the ssh url with html version, which is https://github.com/ANGSD/angsd.git.

git clone https://github.com/ANGSD/angsd.git; cd angsd; make CPPFLAGS="";

Alternatively, you can use the latest stable release tarball:

wget http://popgen.dk/software/download/angsd/angsd0.938.tar.gz;
tar xf angsd0.938.tar.gz;
cd htslib;make;cd ..;
cd angsd;
make HTSSRC=../htslib CPPFLAGS="";

Best wishes,
Isin

isinaltinkaya added a commit that referenced this issue Oct 11, 2022
Add function aio::doAssert to replace asserts
Did not use aio::assert as name  since aio.h
namespace complains due to assert being a macro
Fixes the major bug explained in #527
Fixes issues #520 #474 #466 #420 #405 #396 #385
Possibly others; other issues should rerun the
commands using the latest version.
@g-pacheco
Copy link
Author

Hello @isinaltinkaya,

Apologies for my belated reply here. I have seen that you released v0.940. I just would like to confirm that it did solve the issue.

Thanks once again, George.

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 a pull request may close this issue.

2 participants