Closed sh940202123 closed 2 years ago
The PP ("Proper Pair") tag is used to indicate the gene-specific primers are present and in the correct orientation. I note that you are using the same primer specification as the publication. Was your data generated with these primers? If not then none of then reads will have the PP tag set.
It works after change to proper primer sequence, thanks~~:) But I got another error at last process "preproc:annotate_amplicons (SR:false)"
[10/c212ce] process > preproc:index_bam (bc1066:CYP2D6) [100%] 14 of 14, cached: 14 [4/45]
[29/38be26] process > preproc:alignment_stats (CCS:true) [100%] 2 of 2, cached: 2
[- ] process > preproc:pre_processing_report -
Error executing process > 'preproc:annotate_amplicons (SR:false)'
Caused by:
Process `preproc:annotate_amplicons (SR:false)` terminated with an error exit status (1)
Command executed:
samtools view -u preproc-run.SR.lima.no_bc.mm2.bam |
bam_annotate_amplicons.py - \
--window 500 \
--max-dist 2 \
--amplicons amplicons.json \
--out preproc-run.SR.false.sm_am_annot.bam
Command exit status:
1
Command output:
(empty)
Command error:
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
Traceback (most recent call last):
File "/home/jerry/pipline/PLASTER/bin/bam_annotate_amplicons.py", line 177, in <module>
main(args.in_bam, args.amplicons, args.window, args.max_dist, args.out)
File "/home/jerry/pipline/PLASTER/bin/bam_annotate_amplicons.py", line 127, in main
mp = match_pattern(read.seq[:window], amp[primer], max_dist=max_dist, refine=True)
File "/home/jerry/pipline/PLASTER/bin/bam_annotate_amplicons.py", line 35, in match_pattern
idx, min_dist = min(enumerate(ds), key=operator.itemgetter(1))
ValueError: min() arg is an empty sequence
Work dir:
/home/jerry/pipline/PLASTER/work/b9/fae13008ad31d1b0258dff26330289
Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line
It seems it can't annotate by the primer which I use. Are these primers not compatible with this pipeline?
Hi Jerry,
Any primers should be compatible.
I think you might be running into some kind of edge case bug. Are you able to check a few things for me so I can figure out what is going wrong?
In the working directory /home/jerry/pipline/PLASTER/work/b9/fae13008ad31d1b0258dff26330289
, can you run a few commands and let me know the output (samtools required):
samtools view preproc-run.SR.lima.no_bc.mm2.bam | wc -l
samtools view preproc-run.SR.false.sm_am_annot.bam | wc -l
cat amplicons.json
Cheers
Hi Jemunro,
Here is the output, and it seems not all reads are processed.
➜ samtools view preproc-run.SR.lima.no_bc.mm2.bam | wc -l (samtools)
3520764
➜ samtools view preproc-run.SR.false.sm_am_annot.bam | wc -l (samtools)
[W::bam_hdr_read] EOF marker is absent. The input is probably truncated
188849
➜ cat amplicons.json (samtools)
{
"CYP2D6": {
"chrom": "chr22",
"start": 42125398,
"end": 42131503,
"strand": "-",
"fwd_primer": "GCAGTCGAACATGTAGCTGACTCAGGTCACATGGCAGCTGCCATACAATCCACCTG",
"rvs_primer": "TGGATCACTTGTGCAAGCATCACATCGTAGCGACTGAGCCCTGGGAGGTAGGTAG"
},
"CYP2D7": {
"chrom": "chr22",
"start": 42137550,
"end": 42145176,
"strand": "-",
"fwd_primer": "TGTGAATATTGTCTTTGTGTGGGTG",
"rvs_primer": "CAGGACTCAGGTAATCATATGCTCA"
}
}
Hi Jerry,
A couple of things:
Could you try ammending the above points and let me know if that fixes the issue.
Cheers
It would also be very helpful if you could share part of the BAM file that is causing the issue, e.g. with:
cd /home/jerry/pipline/PLASTER/work/b9/fae13008ad31d1b0258dff26330289
(samtools view -H preproc-run.SR.lima.no_bc.mm2.bam; samtools view preproc-run.SR.lima.no_bc.mm2.bam.bam | head -n188899 | tail -n100) | samtools view -b -o sample.bam`
Hi Jemunro,
It works after changing the primer sequence of amplicon.json file. Thanks for your timely help!
preproc/amplicons.json
, and it runs normally.Then I tried to run typing process and it have similar issues as pre-process.
Do I need to extend the coordinate of typing/amplicon.json
file as same as preproc process?
Can I remove CYP2D7 & fusion gene info in typing/amplicon.json
as same as preproc process?
preproc/amplicon.json
{
"CYP2D6": {
"chrom": "chr22",
"start": 42126037,
"end": 42132626,
"strand": "-",
"fwd_primer": "CATGGCAGCTGCCATACAATCCACCTG",
"rvs_primer": "CGACTGAGCCCTGGGAGGTAGGTAG"
}
}
typing/amplicon.json
{
"CYP2D6": {
"chrom": "chr22",
"start": 42125398,
"end": 42131503,
"strand": "-",
"fusion": "CYP2D7",
"pharmvar_gene": "CYP2D6",
"pharmvar_ver": "4.2.6.1",
"vep_feature":"ENST00000645361"
},
"CYP2D7": {
"chrom": "chr22",
"start": 42137550,
"end": 42145176,
"strand": "-"
}
}
Best, By Jerry
Hi Jerry,
Thats right, based on you preprocessing amplicons.json, you should use the following amplicons.json for the typing component:
{
"CYP2D6": {
"chrom": "chr22",
"start": 42126037,
"end": 42132626,
"strand": "-",
"fwd_primer": "CATGGCAGCTGCCATACAATCCACCTG",
"rvs_primer": "CGACTGAGCCCTGGGAGGTAGGTAG"
"pharmvar_gene": "CYP2D6",
"pharmvar_ver": "4.2.6.1",
"vep_feature":"ENST00000645361"
}
}
Note that you could also use this for the preprocessing component; pharmvar_gene
, pharmvar_ver
and vep_feature
are only used by the typing component and would be ignored at the preprocessing stage.
Hi Jerry, just cheking if this is working for you now so I can close out this issue?
Hi, thank's for the hard work in this pipeline. Everything works fine with the test dataset, but it reported error with real pacbio
subread.bam
file.Here is the command which I use.
And it didn't output any split bam files under the work path.
bin/bam_split_sample_amplicons.py
file, line 35-55It seems only the reads with
PP
tag & equal 1 will be processed & output to bam file. But the input bam filepreproc-run.CCS.true.sm_am_annot.mm2.bam
didn't found any read have PP tag with "1" value. Do I need to process my subread before using this pipeline? Thank you for the time to check this error for me.Best, Jerry
PGx-2D6-R10
folderamplicons.json
filepart of
barcodes.fasta
file, total 96 barcodes included