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

clair and ONT samples aligned with hg19 #43

Closed
sbilobram opened this issue Nov 3, 2020 · 5 comments
Closed

clair and ONT samples aligned with hg19 #43

sbilobram opened this issue Nov 3, 2020 · 5 comments

Comments

@sbilobram
Copy link

Hi all,

My team recently has started to run clair on samples that were aligned with a hg19 reference. Unfortunately this reference does not have the prefix of "chr" in front of the numbers on the header lines indicating the start of the chromosome region. Eg.:
>22 CM000684.1 Homo sapiens chromosome 22, GRCh37 primary reference assembly
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
...

This is correctly reflected in the generated BAMs.
7923634f-8126-4e55-be50-3e9cb09f7964 0 22 10001 1 106S15M1D5M1D11M1D5M...

But the Clair keeps complaining with the error:
."...
No read has been process, either the genome region you specified has no read cover, or please check the correctness of your BAM input....

I have tried a few things but it seems that Clair requires a bam to contain chromosome names containing "chr".

Please comment if this is correct or not and any solution that can be suggested.
thanks

@aquaskyline
Copy link
Member

If you are not using your own BED file or if you've used '--includingAllContigs' in callVarBamParallel.py, the 'chr' prefix will be taken care of by Clair.

For more information, could you please show the full command you have used?

@sbilobram
Copy link
Author

Thanks for reply. I will give samples of my commands but please understand that there is no "chr" in the reference or in the Sample and that seems to be the problem.
we are prefering to run Clair in a container but callVarBamParallel seems to create jobs for conda environment. First generate the commands with default chunk size:
/usr/bin/singularity exec --bind /projects/alignment_references,/projects/analysis/analysis34 clair.simg clair.py callVarBamParallel --chkpnt_fn ./ont/model --ref_fn hg19a.fa --bam_fn F00209_1_lane.bam --sampleName F00209 --threshold 0.2 --includingAllContigs --output_prefix call/var > commandList.pvm
So this list of commands has successfully returned the correct number of jobs partitioned over 10M intervals. They seem to be in Conda mode even though I entered the command from a container. I will list and run the first job:

cat commandList.pvm |head -3
echo "[INFO] --includingAllContigs enabled"

python /opt/conda/envs/clair-env/bin/clair/../clair.py callVarBam --chkpnt_fn "/projects/da_workspace/DA-630/ont/model" --ref_fn "/projects/da_workspace/DA-630/hg19a.fa" --bam_fn "/projects/da_workspace/DA-630/F00209_1_lane.bam" --threshold "0.2" --minCoverage "4" --pypy "pypy3" --samtools "samtools" --delay "10" --threads "4" --sampleName "F00209" --ctgName "1" --ctgStart "0" --ctgEnd "10000000" --call_fn "call/var.1_0_10000000.vcf"

The contig name is correct without "chr" but I will exchange the conda clair command into the equivalent container command.
but when I run I still get the error:

/usr/bin/singularity exec --bind /projects/alignment_references,/projects/analysis/analysis34 clair.simg clair.py callVarBam --chkpnt_fn "/projects/da_workspace/DA-630/ont/model" --ref_fn "/projects/da_workspace/DA-630/hg19a.fa" --bam_fn "/projects/da_workspace/DA-630/F00209_1_lane.bam" --threshold "0.2" --minCoverage "4" --pypy "pypy3" --samtools "samtools" --delay "10" --threads "4" --sampleName "F00209" --ctgName "1" --ctgStart "0" --ctgEnd "10000000" --call_fn "call/var.1_0_10000000.vcf"

Delay 2 seconds before starting variant calling ...
[main_samview] random alignment retrieval only works for indexed BAM or CRAM files.
No read has been process, either the genome region you specified has no read cover, or please check the correctness of your BAM input (/projects/da_workspace/DA-630/F00209_1_lane.bam).
[main_samview] random alignment retrieval only works for indexed BAM or CRAM files.
[INFO] Using 3 CPU threads
INFO:tensorflow:Restoring parameters from /projects/da_workspace/DA-630/ont/model
Restoring parameters from /projects/da_workspace/DA-630/ont/model
Calling variants ...
Processed 0 tensors
Total time elapsed: 0.00 s

I will try a few things more but could use some more suggestions. I have successfully run samples aligned with hg38 without problems so would like to understand what is going wrong here.
Thanks

@aquaskyline
Copy link
Member

it seems your BAM file "/projects/da_workspace/DA-630/F00209_1_lane.bam" is not indexed, which is the reason why no tensor was generated.

@sbilobram
Copy link
Author

let me check and thank-you very much if this is the case....you would have made a lot of people happier....

@sbilobram
Copy link
Author

OKAy looks like it is working....I just had to link to the BAM indices... glad to have this worked out so easily.

Thanks very much!

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