TaliaferroLab / LABRAT

Lightweight Alignment Based Resolution of Alternative Three Prime Ends
MIT License
8 stars 4 forks source link

makeTFfasta - UnboundLocalError #7

Closed qianzhao613 closed 1 year ago

qianzhao613 commented 1 year ago

Hi,

When I tried to use makeTFfast to build an index, I used the following command:

# activate env
source activate labrat
# input
genomegff="~/reference/genes/genes.gtf"
genomeseq="~/reference/fasta/genome.fa"

LABRAT.py --mode makeTFfasta --gff ${genomegff} --genomefasta ${genomeseq} --librarytype 3pseq

Since I tried to build an index for 3' tagged-sequencing, I didn't add the --lasttwoexon parameter, and then the UnboundLocalError raised: UnboundLocalError: local variable 'TFseq' referenced before assignment

I checked the source code, and I guess the problem is when not using --lasttwoexon parameter, there is no TFseq variable assigned before the conditional statement (the variable used here is seq not TFseq, shown below).

1685896918645

I'll try modifying the variable locally to verify it, please correct me if I'm wrong.

Best, Qian

taliaferrojm commented 1 year ago

Hi Qian,

Yes, you are correct. Thanks for catching this error.

LABRAT.py in the repository has been updated, but please note that this has not yet been pushed to conda.