mlbendall / telescope

Quantification of transposable element expression using RNA-seq
MIT License
64 stars 17 forks source link

telescope: error: unrecognized arguments: --stranded_mode #35

Closed jviot closed 2 years ago

jviot commented 2 years ago

First of all, thank you for providing this tool, I have a problem with stranded RNAseq bulk data : When i tried telescope without indicating that the sequencing is stranded i received this error:

$ telescope assign ./output_29691/bam/19BM3764-MEDI.bowtie.bam     ./refs/telescope_rmsk_hg38_locus.gtf     --outdir ./output_29691/telescope_repeatM/     --exp_tag 19BM3764-MEDI     --max_iter 200    --theta_prior 200000 --debug
2022-05-30 10:08:33 INFO
Version:                          1.0.3
Input Options
    samfile:                      ./output_29691/bam/19BM3764-MEDI.bowtie.bam
    gtffile:                      ./refs/telescope_rmsk_hg38_locus.gtf
    attribute:                    locus
    no_feature_key:               __no_feature
    ncpu:                         1
    tempdir:                      None
Reporting Options
    quiet:                        False
    debug:                        True
    logfile:                      <stderr>
    outdir:                       ./output_29691/telescope_repeatM/
    exp_tag:                      19BM3764-MEDI
    updated_sam:                  False
Run Modes
    reassign_mode:                exclude
    conf_prob:                    0.9
    overlap_mode:                 threshold
    overlap_threshold:            0.2
    annotation_class:             intervaltree
Model Parameters
    pi_prior:                     0
    theta_prior:                  200000
    em_epsilon:                   1e-07
    max_iter:                     200
    use_likelihood:               False
    skip_em:                      False
 (from run in telescope_assign.py:197)
2022-05-30 10:08:33 INFO     Loading annotation...                                        (from run in telescope_assign.py:205)
2022-05-30 10:08:33 DEBUG    Using intervaltree for annotation.                           (from __init__ in _annotation_intervaltree.py:30)
2022-05-30 10:08:38 INFO     Loaded annotation in 0 minutes and 5 secs                    (from run in telescope_assign.py:208)
2022-05-30 10:08:38 INFO     Loaded 14968 features.                                       (from run in telescope_assign.py:209)
2022-05-30 10:08:38 INFO     Loading alignments...                                        (from run in telescope_assign.py:214)
Traceback (most recent call last):
  File "/Home/Users/jviot/.conda/envs/HERV_v2/bin/telescope", line 11, in <module>
    load_entry_point('telescope-ngs==1.0.3', 'console_scripts', 'telescope')()
  File "/Home/Users/jviot/.conda/envs/HERV_v2/lib/python3.6/site-packages/telescope/__main__.py", line 95, in main
    args.func(args)
  File "/Home/Users/jviot/.conda/envs/HERV_v2/lib/python3.6/site-packages/telescope/telescope_assign.py", line 216, in run
    ts.load_alignment(annot)
  File "/Home/Users/jviot/.conda/envs/HERV_v2/lib/python3.6/site-packages/telescope/utils/model.py", line 161, in load_alignment
    maps, scorerange, alninfo = self._load_sequential(annotation)
  File "/Home/Users/jviot/.conda/envs/HERV_v2/lib/python3.6/site-packages/telescope/utils/model.py", line 250, in _load_sequential
    _minAS = min(_minAS, *_scores)
TypeError: 'int' object is not iterable

Then when i try to put the stranded_mode argument, it respond "unrecognized"

$ telescope assign ./output_29691/bam/19BM3764-MEDI.bowtie.bam     ./refs/telescope_rmsk_hg38_locus.gtf     --outdir ./output_29691/telescope_repeatM/     --exp_tag 19BM3764-MEDI  --stranded_mode RF  --max_iter 200    --theta_prior 200000
usage: telescope [-h] [--version] {assign,resume,test} ...
telescope: error: unrecognized arguments: --stranded_mode RF

I used Telescope in the 1.0.3 version, and alignement has been performed according to this command:

bowtie2 -x ./refs/GRCh38_noalt_as/GRCh38_noalt_as \
    -1 input/ERV_ColonMeditreme/19BM3764-MEDI_R1.fastq.gz \
    -2 input/ERV_ColonMeditreme/19BM3764-MEDI_R2.fastq.gz \
    --rf \
    -k 100 -p 16 --very-sensitive-local --score-min L,0,1.6 | samtools view -bP - > ./output_$Ext_Number/bam/19BM3764-MEDI.bowtie.bam

So if you have any clue to help me with this, thanks a lot

ashleyzhou972 commented 2 years ago

I have the same problem with the --stranded_mode argument not recognized. I’m also using the v1.0.3 docker.

I was able to run telescope without the stranded option if I preprocess my bam to remove unpaired reads per https://github.com/mlbendall/telescope/issues/3

jviot commented 2 years ago

My problem was link to pair mates that was not adjacent. Samtools sort by names solve my problem.