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

Error! should be at least 1 contig #189

Closed
james-e-barrett opened this issue May 24, 2024 · 3 comments
Closed

Error! should be at least 1 contig #189

james-e-barrett opened this issue May 24, 2024 · 3 comments

Comments

@james-e-barrett
Copy link

Hi,

I get the following error running

./modkit pileup \
~/Data/nanopore/mysample.pass.sorted.bam \
~/Data/nanopore/mysample.pileup.bed \
--ref ~/Data/hg38.fa \
--cpg
> calculated chunk size: 6, interval size 100000, processing 600000 positions concurrently
> filtering to only CpG motifs
> attempting to sample 10042 reads
> Using filter threshold 0.7207031 for C.
> Error! should be at least 1 contig

It runs fine without the --ref and --cpg arguments.

Any help appreciated thanks.

@ArtRand
Copy link
Contributor

ArtRand commented May 24, 2024

Hello @james-e-barrett,

Could you check that the reference you're using with modkit is the same as the one you used in alignments (i.e. the contigs should have the same names)?

@james-e-barrett
Copy link
Author

Hi @ArtRand,

The reference used was indeed different (somebody else did the alignment). In my .bam file the chromosomes are labelled "1", "2", etc., but in the reference genome I used from UCSC (hg38.fa) they are labelled "chr1", "chr2", etc.

Changing the chromosome names in my .bam file fixed this. Using the same reference genome throughout would presumably avoid the problem also.

Thanks for your help.

@ArtRand
Copy link
Contributor

ArtRand commented May 27, 2024

Great, feel free to re-open this issue if you have any additional questions or encounter another related problem.

@ArtRand ArtRand closed this as completed May 27, 2024
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