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

Strand assignment problem for junctions #99

Open
shiro-kur opened this issue Jan 23, 2025 · 2 comments
Open

Strand assignment problem for junctions #99

shiro-kur opened this issue Jan 23, 2025 · 2 comments

Comments

@shiro-kur
Copy link

shiro-kur commented Jan 23, 2025

Hi ! trackplot is a great tool. So convenient.

I found a strand problem.

I tried to perform
$ trackplot
-e chr9:112296343-112335026
-r Homo_sapiens.GRCh38.101.chr.gtf.gz
--density bam.tsv
-o PTBP3.include.pdf
--dpi 300
--width 6
--height 1 --show-junction-num
--included-junctions chr9:112297917-112330441:-,chr9:112297917-112333470:-,chr9:112330475-112333470:-
,but I could not find any junctions.

Finally, I found the error for the strand assignment.
Only with the options above, the all junctions were assigned to plus.

I would like you to improve the problem. Maybe the problem is in the options for library strandness.

for jxn_idx, jxn in enumerate(jxns_sorted_list):
print("jxn_idx,jxn" ,jxn_idx,jxn )
---output----
jxn_idx,jxn chr9:111641804-112514802:+ 0
jxn_idx,jxn chr9:111641804-112514447:+ 1
jxn_idx,jxn chr9:112268196-112333470:+ 2
jxn_idx,jxn chr9:112276014-112333470:+ 3
jxn_idx,jxn chr9:112297917-112333470:+ 4
jxn_idx,jxn chr9:112297917-112333103:+ 5
jxn_idx,jxn chr9:112297917-112332894:+ 6
jxn_idx,jxn chr9:112297917-112332784:+ 7
jxn_idx,jxn chr9:112297917-112330441:+ 8
jxn_idx,jxn chr9:112268196-112297841:+ 9
jxn_idx,jxn chr9:112268196-112297832:+ 10
jxn_idx,jxn chr9:112276014-112297841:+ 11
jxn_idx,jxn chr9:112276014-112297832:+ 12
jxn_idx,jxn chr9:112294511-112297832:+ 13
jxn_idx,jxn chr9:112330475-112333470:+ 14
jxn_idx,jxn chr9:112330475-112332894:+ 15

@ygidtu
Copy link
Owner

ygidtu commented Jan 26, 2025

Hi shiro-kur:
I have reviewed the code logic, and based on our example data, the functionality appears to be working correctly for filtering purposes. The --included-junctions parameter is specifically designed to retain junctions from the BAM file, and the filtering process can be observed in lines 279-280 of the trackplot/file/Bam.py file.

To assist with further debugging, could you please provide a detailed list of the junctions retained before and after the filtering process? This information will help us identify any potential issues and ensure the functionality is performing as expected.

Looking forward to your response.

Best regards,
Yiming

@ygidtu
Copy link
Owner

ygidtu commented Feb 8, 2025

Hi shiro-kur:
We've updated our repository with a new version of the code (not yet officially released). We've modified the logic for judging --included_junctions and added more detailed debug logs, which might help you with your issue. You can consider pulling the latest code to test it out.

If you encounter the same problem, please run trackplot with the parameters --verbose and --logfile, and upload the generated logfile for us to assist in further debugging.

For example,

git clone https://github.com/ygidtu/trackplot trackplot
pip install -r requirements.txt

python main.py \
  -e chr9:112296343-112335026 \
  -r Homo_sapiens.GRCh38.101.chr.gtf.gz \
  --density bam.tsv \
  -o PTBP3.include.pdf \
  --dpi 300  \
  --width 6  \
  --height 1 --show-junction-num  \
  --included-junctions chr9:112297917-112330441:-,chr9:112297917-112333470:-,chr9:112330475-112333470:-  \
 --verbose --logfile trackplot.log

Looking forward to your response.

Best regards,
Yiming

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