UCA-MSI / iSanefalcon

Other
2 stars 0 forks source link

keytype error while running iSanefalcon #1

Closed sneha1201 closed 2 years ago

sneha1201 commented 2 years ago

Hello,

while running iSanefalcon i am getting below mentioned error

raise KeyError(key)

KeyError: 'trainnucl' if anyone can help me with this it would be a great help . And also seqff_reference_sanefalcon.csv for trainref from where this file is produced.

marcomilanesio commented 2 years ago

Too few information to reproduce the error. Can you post the complete stack trace?

sneha1201 commented 2 years ago

below mentioned is all which i get after running

Traceback (most recent call last): File "main.py", line 83, in model = train(group_name, training_set) File "main.py", line 39, in train nucleosome_file = monitor.training(config, training_set) File "/home/Deeksha/GM01/GM01_C/iSanefalcon/monitor.py", line 115, in training nucleosome_file, img_file = create_nucleosome_profiles(f, mapping) File "/home/Deeksha/GM01/GM01_C/iSanefalcon/monitor.py", line 105, in create_nucleosome_profiles return p.combine(training) File "/home/Deeksha/GM01/GM01_C/iSanefalcon/nucleosome/profiler.py", line 34, in combine outfile = self.fm.config['default']['trainnucl'] File "/home/Deeksha/anaconda3/lib/python3.8/configparser.py", line 1254, in getitem raise KeyError(key) KeyError: 'trainnucl'

marcomilanesio commented 2 years ago

Thanks. Looks like you don't have 'trainnucl' key in your conf file.

This file contains the nucleosome profiles for the genomes in the training set.

Try adding that key to your conf file (in the current master branch is commented out)

sneha1201 commented 2 years ago

[default] samtools=samtools nucltemplate : nucl_track trainref=/home/Deeksha/mdlab/storage/data_nice/seqff_reference_sanefalcon.csv

[folders] data=/home/Deeksha/GM01/GM01_C/bamfiles rsp=/home/Deeksha/mdlab/storage/sanefalcon/rsp train=/home/Deeksha/mdlab/storage/sanefalcon/training profiles=/home/Deeksha/mdlab/storage/sanefalcon/training/profiles test=/home/Deeksha/mdlab/storage/sanefalcon/testing testprofiles=/home/Deeksha/mdlab/storage/sanefalcon/testing/profiles listtestingdir=/home/Deeksha/mdlab/storage/data_nice/list_testing_sanefalcon

[training] batchsize=1

This is my configure file . where i need to add keytyoe ?

and also did you know about this seqff_reference_sanefalcon.csv trainref file ? from where it is generated ?

marcomilanesio commented 2 years ago

You need to add this in the 'default' section, as the error suggests. Take a look at the sanefalcon.conf file in the master branch.

As for the seqff_reference_sanefalcon.csv this is something the is not generated, you need to use your own, depending on your cohorte, your methodology, and the reference you want to use. In our experiments, we wanted to test the fetal fraction computed by iSanefalcon with respect to seqff, which was used in clinical trials in the past years for the cohorte on which we were working on.

sneha1201 commented 2 years ago

Hello,

Will you tell me the format for seqff_reference_sanefalcon.csv file , or guide me how to prepare the same .

i tried seqff , but there's no manual there how to use it . if you can guide me with this it will be a great help.

Thanks in advance.

marcomilanesio commented 2 years ago

As you may see from its usage, the reference file is a simple csv in the form:

sample1.bam 10.2953 Female
sample2.bam 17.7723 Female
sample3.bam 14.0203 Male

containing three columns, (1) the name of the file, (2) the ff fraction % and (3) the sex of the fetus. Basically it's a summary of what your other method found (in this case seqff).

Speaking of which, I do not maintain seqff, so a simple google search will do the job (e.g., here)

sneha1201 commented 2 years ago

Thanks for such guidance.

After running seqff R script over one of my sam file i got this result : "SeqFF",0.122891340680309 "Enet",0.0888612161167863 "WRSC",0.156921465243832

is this mean my seqFF value is 12.28 roundoff ?

marcomilanesio commented 2 years ago

Yes.

sneha1201 commented 1 year ago

Hello ,

if you can guide me with this , it would be a great help. If we are getting negative value what does it mean .

like i am getting value like this "","x" "SeqFF",NA "Enet",NA "WRSC",-0.567157238232598

what does this signify

Thanks in advance

marcomilanesio commented 1 year ago

Hello. Negative values are usually a sign of either bad reference set or a too small dataset. Can you provide more details on your experiment?——-MarcoOn 5 Dec 2022, at 10:19, sneha1201 @.***> wrote: Hello , if you can guide me with this , it would be a great help. If we are getting negative value what does it mean . like i am getting value like this "","x" "SeqFF",NA "Enet",NA "WRSC",-0.567157238232598 what does this signify Thanks in advance

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you modified the open/close state.Message ID: @.***>