Comments (9)
I am not sure. You were able to run bwameth.py index
without problems?
Do other tools (fastqc, etc) run without problems on your fastq files?
from bwa-meth.
I am having the same error when converting the sam files generated by alignment with bwa-meth to bam files:
[W::sam_parse1] urecognized reference name; treated as unmapped
I tried two variations of the command to align a single-end read and convert sam to bam:
bwameth.py --threads 8 --reference ref_genome.fa sample.fastq > sample.sam samtools view -b -o sample.bam sample.sam
and
bwameth.py --reference ref_genome.fa sample.fastq -t 8 | samtools view -b - > sample.bam
I was able to run bwameth.py index
without any issues. I have tried the above commands on a few different fastq files and I am currently double-checking my fastq files with fastqc for any issues.
The environment I am using had the following package versions installed:
bwa 0.7.17
bwa-mem2 2.2.1
bwameth 0.2.5
python 3.11.0
samtools 1.6
toolshed 0.4.6
Please let me know if you have any advice on how to troubleshoot this error message.
Thank you.
from bwa-meth.
One problem I noticed is bwameth.py
puts nothing in the chrom
column when the read is unmapped, while it should put an *
there:
readname\t77\t\t0\t0\t*\t*\t0\t0\tGNAATCATGTGTCTTCTTATCTCTAAATCAGAATCCCGCCCAAACGAAACGATACGACAACGCCGCGAAACCTCGATTAACCTCAAATAACCAATCCCCCACCGATCCCCGCCGCCGAACCCCCCGCGCCAGCCCGCGCCCCGCGCGGCCG\t;#CCCCCCC;CCCCCCCCCCCCCCCCCCCCCCCCCC;CCCCCC-CCCCCCC;CCCCCCCCCCCCCCCCCCCCCCC;CC--CCC;CC;CCCC;C;C;;;CC-CC--C;-CC--C;-CC--C---;--C--C--;C--;---CC;CCC-----\tAS:i:0\tXS:i:0\tRG:Z:test\tYC:Z:CT\n
. This may cause some software to report Unrecognized reference name
.
from bwa-meth.
@haodongchen , thanks for diagnosing. I pushed a fix for this, would you or others in this issue give it a try and let me know?
thanks!
from bwa-meth.
@brentp, I can confirm that the blank chrom
column is causing the issue because I did not get this error when I removed reads that were blank in the chrom
column.
I pulled your most recent update and ran alignment with the updated bwameth.py.
bwameth.py --reference hg19.p13.plusMT.no_alt_analysis_set.fa.gz SRR536237.fastq > SRR536237.sam
The resulting sam file still contained blank chrom
columns for some reads:
SRR536237.29 16 chr17 75537577 60 101M * 0 0ACTACCCCGAATAAACCACACTCCTTACAAAAACCAAACAACTACGTTAAAAAAATATTAATATTTATCAAAAAACCCTCTTCCAACCATTTTTAATTTTT #########A>3><3<>A>=953>;;=?????>7;A@A@;?@;.<DDDDDEECCB@B<DDECECDB?16DDIEE??3A+3:FAIEE@>DDDDADDDD???? NM:i:1 MD:Z:76A24 AS:i:98XS:i:29 RG:Z:SRR536237 YC:Z:CT YD:Z:r
SRR536237.30 4 0 0 * * 0 0 TTGTTGTTTGGAGATGTTTTGGTTTTGTGGTTTTAAGGCTTTGGAGAAGGGAGGGGAAAATATGTGTTTTTTTTTTGAATTAGGGTTATTAAAGTTAATTT ????8:ADD>?+2++2AEEDD<<C;FBEEI?8))*:*?*09DBB######################################################### AS:i:0 XS:i:0 RG:Z:SRR536237 YC:Z:CT
When I ran samtools view -S -b SRR536237.sam > SRR536237.bam
, it returned the same error.
[W::sam_parse1] urecognized reference name; treated as unmapped
Please let me know if any other information would be helpful.
Thank you.
from bwa-meth.
thanks for following up @MSleeper1 . Can you share a fastq with 2 reads that show the problem?
I think this is likely something with not having paired-end reads as there are likely few users with single-end reads.
from bwa-meth.
I tried the fix and it solved the problem I got.
from bwa-meth.
@MSleeper1 and @haodongchen thanks for following up! I'll tag a new release with the fix.
from bwa-meth.
I dug into which script was being used when I called bwameth.py
and found that has been defaulting to using miniconda3/envs/bwa/bin/bwameth.py
.
When I ran the alignment and specified the absolute path miniconda3/pkgs/bwameth-0.2.5-pyh5e36f6f_0/python-scripts/bwameth.py
, which contains your most recent push. This solved my problem; there are now *
in the chrom
columns that were previously blank.
Thank you for all the help. :)
from bwa-meth.
Related Issues (20)
- Question: multimapping handling HOT 4
- Methylcaller alternatives to recommended MethylDackel HOT 1
- Output of bwa-meth in BAM format HOT 1
- The link in `README.md` of the `compare/` folder is not working HOT 4
- [Release Request] make a release since bwa-mem2 index are not included in current version HOT 1
- bwa-meth index error HOT 12
- bwa-mem2 cannot recognize the input from the pipe HOT 5
- broken pipeline HOT 3
- `handle_header` mangles alt contigs HOT 2
- Unique mapped reads HOT 1
- Q: Issues with installation 0.2.5 HOT 1
- Timestamp checking of .fa files prevents me from running bwa-meth in the cloud HOT 2
- Meet Error When running bwa meth mem2
- Help command for aligner command does not work HOT 1
- repeated alignment (bwa get stuck) HOT 2
- when running bwameth example, exception: AttributeError: module 'toolshed.files' has no attribute 'prefunc' HOT 2
- BWA-meth mapping issues
- Exception("bad or empty fastqs") HOT 2
- Overriding hardcoded -B values is possible from command line HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bwa-meth.