faircloth-lab / phyluce

software for UCE (and general) phylogenomics
http://phyluce.readthedocs.org/
Other
76 stars 48 forks source link

ConfigParser.NoSectionError: No section: 'names' #158

Closed liugang9988 closed 3 years ago

liugang9988 commented 5 years ago

Hi Dr. Faircloth,

I've been following your phyluce tutorial, and I copied the illumiprocessor config file but somehow I am getting this error:

(illumiprocessor) [gll23@holylogin03 uce-tutorial]$ illumiprocessor --input raw-fastq/ --output clean-fastq --config illumiprocessor.conf [WARNING] Output directory exists, REMOVE [Y/n]? Y 2019-05-06 22:29:48,146 - illumiprocessor - INFO - ==================== Starting illumiprocessor =================== 2019-05-06 22:29:48,163 - illumiprocessor - INFO - Version: 2.0.9 2019-05-06 22:29:48,164 - illumiprocessor - INFO - Argument --config: illumiprocessor.conf 2019-05-06 22:29:48,164 - illumiprocessor - INFO - Argument --cores: 1 2019-05-06 22:29:48,164 - illumiprocessor - INFO - Argument --input: /n/scratchlfs/ds_lab/ganu/uce-tutorial/raw-fastq 2019-05-06 22:29:48,164 - illumiprocessor - INFO - Argument --log_path: None 2019-05-06 22:29:48,164 - illumiprocessor - INFO - Argument --min_len: 40 2019-05-06 22:29:48,164 - illumiprocessor - INFO - Argument --no_merge: False 2019-05-06 22:29:48,164 - illumiprocessor - INFO - Argument --output: /n/scratchlfs/ds_lab/ganu/uce-tutorial/clean-fastq 2019-05-06 22:29:48,164 - illumiprocessor - INFO - Argument --phred: phred33 2019-05-06 22:29:48,164 - illumiprocessor - INFO - Argument --r1_pattern: None 2019-05-06 22:29:48,164 - illumiprocessor - INFO - Argument --r2_pattern: None 2019-05-06 22:29:48,164 - illumiprocessor - INFO - Argument --se: False 2019-05-06 22:29:48,164 - illumiprocessor - INFO - Argument --trimmomatic: /n/home08/gll23/.conda/envs/illumiprocessor/bin/trimmomatic 2019-05-06 22:29:48,164 - illumiprocessor - INFO - Argument --verbosity: INFO Traceback (most recent call last): File "/n/home08/gll23/.conda/envs/illumiprocessor/bin/illumiprocessor", line 17, in sys.exit(main()) File "/n/home08/gll23/.conda/envs/illumiprocessor/lib/python2.7/site-packages/illumiprocessor/cli/main.py", line 121, in main main(args) File "/n/home08/gll23/.conda/envs/illumiprocessor/lib/python2.7/site-packages/illumiprocessor/main.py", line 33, in main for start_name, end_name in conf.items('names'): File "/n/home08/gll23/.conda/envs/illumiprocessor/lib/python2.7/ConfigParser.py", line 642, in items raise NoSectionError(section) ConfigParser.NoSectionError: No section: 'names'

Could you help to take a look? Thank you very much.

Best wishes,

Gang

brantfaircloth commented 5 years ago

Illumiprocessor is having a hard time parsing your config file - this may be because you lack the section names as noted in the NoSectionError, but it also could be beause you've used characters in your names (in previous sections) that are forbidden. Those characters are typically dashes, but can be other things like +-/% etc.

liugang9988 commented 5 years ago

Very cool, thank you, it works by double check the config file

SamSaltyScience commented 4 years ago

Good Evening,

I am having a similar problem to the one described above. I keep getting the error regarding ConfigParser.NoSectionError: No section: 'names'

I had participated in a Illumina Nextara class and they gave us back our data already demultiplexed with the adapters removed. I'm trying to trim my reads to remove the super short reads, N, low quality etc and I hit the 'names' error using only one sample.

Here's the names of the fastq files:

SD-AC226_CGTCTCATAT_L001_R1_001.fastq SD-AC226_CGTCTCATAT_L001_R2_001.fastq

Here's the error once again.

2020-01-12 19:21:16,286 - illumiprocessor - INFO - ==================== Starting illumiprocessor =================== 2020-01-12 19:21:16,286 - illumiprocessor - INFO - Version: 2.0.9 2020-01-12 19:21:16,287 - illumiprocessor - INFO - Argument --config: your-illumiprocessor.conf 2020-01-12 19:21:16,287 - illumiprocessor - INFO - Argument --cores: 1 2020-01-12 19:21:16,287 - illumiprocessor - INFO - Argument --input: /Users/sam/Desktop/NGS_Practice/Trim2/Trim2 2020-01-12 19:21:16,287 - illumiprocessor - INFO - Argument --log_path: None 2020-01-12 19:21:16,287 - illumiprocessor - INFO - Argument --min_len: 40 2020-01-12 19:21:16,287 - illumiprocessor - INFO - Argument --no_merge: False 2020-01-12 19:21:16,287 - illumiprocessor - INFO - Argument --output: /Users/sam/Desktop/NGS_Practice/Trim2/uce-clean 2020-01-12 19:21:16,287 - illumiprocessor - INFO - Argument --phred: phred33 2020-01-12 19:21:16,287 - illumiprocessor - INFO - Argument --r1_pattern: None 2020-01-12 19:21:16,287 - illumiprocessor - INFO - Argument --r2_pattern: None 2020-01-12 19:21:16,288 - illumiprocessor - INFO - Argument --se: False 2020-01-12 19:21:16,288 - illumiprocessor - INFO - Argument --trimmomatic: /Users/sam/opt/anaconda3/envs/illumiprocessor/bin/trimmomatic 2020-01-12 19:21:16,288 - illumiprocessor - INFO - Argument --verbosity: INFO Traceback (most recent call last): File "/Users/sam/opt/anaconda3/envs/illumiprocessor/bin/illumiprocessor", line 17, in sys.exit(main()) File "/Users/sam/opt/anaconda3/envs/illumiprocessor/lib/python2.7/site-packages/illumiprocessor/cli/main.py", line 121, in main main(args) File "/Users/sam/opt/anaconda3/envs/illumiprocessor/lib/python2.7/site-packages/illumiprocessor/main.py", line 33, in main for start_name, end_name in conf.items('names'): File "/Users/sam/opt/anaconda3/envs/illumiprocessor/lib/python2.7/ConfigParser.py", line 642, in items raise NoSectionError(section) ConfigParser.NoSectionError: No section: 'names'

I also have my Config file:

[adapters] i7:CTGTCTCTTATACACATCTCCGAGCCCACGAGACATCTCGTATGCCGTCTTCTGCTTG i5:CTGTCTCTTATACACATCTGACGCTGCCGACGAGTGTAGATCTCGGTGGTCGCCGTATCATT [tag sequences] i7-N701:CGTCTCATAT i5-N501:TATAGTAGCT [tag map] SD-AC226_CGTCTCATAT:i7-N701,i5-N501 [names] SD-AC226_CGTCTCATAT:A-cespitosus

I am hoping you can tell me where I am going wrong? Is it my naming within the files?

Thank you for any help you may have in advance!

Cheers,

Sam D.

brantfaircloth commented 4 years ago

Can you try a different name in your [names] section - e.g. a_cespitosus or acespitosus?

SamSaltyScience commented 4 years ago

Good Evening!

Sorry for my late response.

I've tried both a_cespitosus and acespitosus and unfortunately I get the same error both times.

Sam

brantfaircloth commented 4 years ago

Are you sure that you are passing the correct name for your configuration file? (e.g. is it really named your-illumiprocessor.conf)? Do the example files from https://phyluce.readthedocs.io/en/latest/tutorial-one.html run?

SamSaltyScience commented 4 years ago

Brant,

I've tried the example files you mentioned. On my Mac I get through part of it and then I get an error message involving Trinity and the lack of future updating for Mac OS. When I try it on our server at work using Linux I once again get stuck at the names error. I've tried copying and pasting the example config file and it's still not working.

Sam D.

On Wed, Jan 15, 2020 at 6:33 AM Brant Faircloth notifications@github.com wrote:

Are you sure that you are passing the correct name for your configuration file? (e.g. is it really named your-illumiprocessor.conf)? Do the example files from https://phyluce.readthedocs.io/en/latest/tutorial-one.html run?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/faircloth-lab/phyluce/issues/158?email_source=notifications&email_token=AOGDLCNHCJOL5PGDPSMMFITQ54NB3A5CNFSM4HLE4FRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJAQDLY#issuecomment-574685615, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOGDLCJVCG72NGAVN757ZKTQ54NB3ANCNFSM4HLE4FRA .

SamSaltyScience commented 4 years ago

Brant,

I figured it out! Apparently, our phyluce package needed updating and then my computer was saving my Config files as .conf.txt files.

My apologies!

Sam D

On Tue, Jan 21, 2020 at 2:38 PM Samantha Donohoo sadonohoo@gmail.com wrote:

Brant,

I've tried the example files you mentioned. On my Mac I get through part of it and then I get an error message involving Trinity and the lack of future updating for Mac OS. When I try it on our server at work using Linux I once again get stuck at the names error. I've tried copying and pasting the example config file and it's still not working.

Sam D.

On Wed, Jan 15, 2020 at 6:33 AM Brant Faircloth notifications@github.com wrote:

Are you sure that you are passing the correct name for your configuration file? (e.g. is it really named your-illumiprocessor.conf)? Do the example files from https://phyluce.readthedocs.io/en/latest/tutorial-one.html run?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/faircloth-lab/phyluce/issues/158?email_source=notifications&email_token=AOGDLCNHCJOL5PGDPSMMFITQ54NB3A5CNFSM4HLE4FRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJAQDLY#issuecomment-574685615, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOGDLCJVCG72NGAVN757ZKTQ54NB3ANCNFSM4HLE4FRA .

brantfaircloth commented 4 years ago

Glad you were able to get it fixed.

marianamazzochi commented 1 year ago

@SamSaltyScience, I am getting the same error: you said that your Mac was saving your config files as .conf.txt files, which is also happening to me; however, I could not figure out how to make them only .conf. Could you help me, please?

@brantfaircloth also mentioned that our .conf files should be named as "your-illumiprocessor". What do you mean? They should have the same name as the version of Illumiprocessor that we're using?

Cheers, Mariana M

brantfaircloth commented 1 year ago

You’ll need to manually rename the config file to have the correct extension. As for the naming, you can name the file whatever you like - it just need to end in .conf

marianamazzochi commented 1 year ago

Brant, thanks for the very fast answer. The name of the file on Finder appears as: illumiprocessor.conf; however, when I click on "Get Info", it shows that its name is, in fact, illumiprocessor.conf.rtf. Do you have any idea of what should I do to make it work?

Cheers,

marianamazzochi commented 1 year ago

i.e., when I try to manually rename the file, it appears that its name is just .conf. But it's not...

brantfaircloth commented 1 year ago

you can rename in the terminal/command line. probably the easiest way to do it.

marianamazzochi commented 1 year ago

Thanks, Brant. I was able to rename the file, but it still hasn't worked out. The error is:

Traceback (most recent call last): File "/Users/marimazzochi/opt/miniconda3/envs/phyluce-1.7.1/bin/illumiprocessor", line 17, in sys.exit(main()) File "/Users/marimazzochi/opt/miniconda3/envs/phyluce-1.7.1/lib/python3.6/site-packages/illumiprocessor/cli/main.py", line 114, in main main(args) File "/Users/marimazzochi/opt/miniconda3/envs/phyluce-1.7.1/lib/python3.6/site-packages/illumiprocessor/main.py", line 33, in main for start_name, end_name in conf.items("names"): File "/Users/marimazzochi/opt/miniconda3/envs/phyluce-1.7.1/lib/python3.6/configparser.py", line 849, in items raise NoSectionError(section) configparser.NoSectionError: No section: 'names'

P.s.: I double-checked my section 'names' and there is no special character like -+ (or etc).

Cheers,

brantfaircloth commented 1 year ago

I'll need more information to be of much help - a copy of the config file and the command you are using to run illumiprocessor, at a minimum. It could also be a windows/unix line endings problem - hard to say.

marianamazzochi commented 1 year ago

Brant, Thanks again for the fast response. I am using a tutorial with a config file that looks like this:

[adapters] i7: GATCGGAAGAGCACACGTCTGAACTCCAGTCAC-BCBCBCBC-ATCTCGTATGCCGTCTTCTGCTTG i5: AATGATACGGCGACCACCGAGATCTACAC-BCBCBCBC-ACACTCTTTCCCTACACGACGCTCTTCCGATCT

[tag sequences] i5P01WG01:TCTACTCT i7P01WG01:CACCTTAC

[tag map] RAPiDGenomicsHJYMTBBXXSIU115401P01WG01:i5P01WG01,i7P01WG01

[names] RAPiDGenomicsHJYMTBBXXSIU115401P01WG01:apeteJLB07

Furthermore, I am working on a iOS. Thanks so much for your help.

brantfaircloth commented 1 year ago

This config file does not look structured quite correctly - e.g. the adapters section contains weird adapters, etc. The [tag sequences] section also has very long names (same for the [tag map] section). I am not sure any of these are causing the issue you are having - it could simply be the file structure you are using... or a file named improperly, etc. However, that is hard for me to tell without the actual file and the command-line parameters you used.

NYX-PLUTO commented 1 year ago

Hi Brant,

I am dealing with the same error when trying to use illumiprocessor. I have followed through with your suggestions in the other questions above but still get the problem. I'm using the configuration file template from the tutorial, so there are no weird characters in it. Lastly, I'm using the linux subsystem for windows on a dell laptop.

Thank you for your time and help. phylucetuterr configimage

brantfaircloth commented 1 year ago

Can you attach the config file you are using? I'll check it w/ my installation to see if there are errors. The issue you are seeing could be related to line endings.

NYX-PLUTO commented 1 year ago

Thank you for the fast response! I converted the file to .txt so it would upload. configfile.txt

NYX-PLUTO commented 1 year ago

Update: There were files in the raw-fastq directory that were causing the error (e.g. Alligator_mississippiensis_GGAGCTATGG_L001_R1_001.fastq.gz:Zone.Identifier). Removing these files fixed the error for me.

brantfaircloth commented 1 year ago

That’ll do it. Glad you got it working 👍