deepRAM icon indicating copy to clipboard operation
deepRAM copied to clipboard

IndexError: string index out of range error for sequences

Open aishsk87 opened this issue 4 years ago • 0 comments

Hi I am running the deepRAM as follows python deepRAM.py --train_data CLIP_train.gz --test_data CLIP_test.gz --data_type RNA --train True --evaluate_performance True --model_path DeepBind.pkl --out_file prediction.txt --Embedding False --Conv True --RNN False --conv_layers 1

and my training and testing files are : Clip_test.gz Clip_train.gz

I get the following error when I run it: python deepRAM.py --train_data Clip_train.gz --test_data Clip_test.gz --data_type RNA --train True --evaluate_performance True --model_path DeepBind.pkl --out_file prediction.txt --Embedding False --Conv True --RNN False --conv_layers 2 cuda:0 False Load Data Traceback (most recent call last): File "deepRAM.py", line 982, in main() File "deepRAM.py", line 980, in main run_deepRAM(args)
File "deepRAM.py", line 896, in run_deepRAM Load_Data(train_data,test_data) File "deepRAM.py", line 473, in Load_Data train1,valid1,train2,valid2,train3,valid3,alldataset,sequences=chipseq.openFile() File "deepRAM.py", line 318, in openFile train_dataset.append([seqtopad(row[0],self.motiflen),[int(row[1])]]) File "deepRAM.py", line 36, in seqtopad if i-motlen+1<len(sequence) and sequence[i-motlen+1]=='N' or ilen(sequence)+motlen-2: IndexError: string index out of range

I am not sure if the sequence length should be greater than or less than a specific length. Thanks in advance.

aishsk87 avatar Jun 23 '20 16:06 aishsk87