Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble Running Snakemake via Tibanna #256

Open
sengoku93 opened this issue Nov 14, 2019 · 53 comments
Open

Trouble Running Snakemake via Tibanna #256

sengoku93 opened this issue Nov 14, 2019 · 53 comments

Comments

@sengoku93
Copy link

Hi,

I am running custom snakemake via tibanna. However, the runs fail and it does not deposit snakemake log to corresponding s3 bucket I deployed. I have attached log file here for your review. Any suggestions.

This is the command I used: snakemake --tibanna --default-remote-prefix=tibannatestdata -s tibanna_ichorCNA_snakemake.mk

Thank you!

yuWQY5gCrdfz.log

@SooLee
Copy link
Member

SooLee commented Nov 14, 2019

The log file says

MissingRuleException:
No rule to produce tibannatestdata/case6_WEX_T_sample.sorted.bqsr/readDepth/case6_WEX_T_sample.sorted.bqsr.bin1000000.wig

Do you mind running with --verbose option and paste what appears on the screen?

@sengoku93
Copy link
Author

So far on the screen: [i also do not have a docker for this, I am assuming it will use software installed from ec2 that I kicked off snakemake]

job input tibannatestdata/case6_WEX_T_sample.sorted.bqsr/case6_WEX_T_sample.sorted.bqsr.bam
job input is remote= true
is remote default= true
job output tibannatestdata/case6_WEX_T_sample.sorted.bqsr/readDepth/case6_WEX_T_sample.sorted.bqsr.bin1000000.wig
job output is remote= true
is remote default= true
command = snakemake tibannatestdata/case6_WEX_T_sample.sorted.bqsr/readDepth/case6_WEX_T_sample.sorted.bqsr.bin1000000.wig --snakefile tibanna_ichorCNA_snakemake.mk --force -j1 --keep-target-files --keep-remote --latency-wait 0 --attempt 1 --force-use-threads --allowed-rules read_counter --nocolor --notemp --no-hooks --nolock --default-resources "mem_mb=max(2input.size, 1000)" "disk_mb=max(2input.size, 1000)"
{
"jobid": "RJq8LVs8BePl",
"config": {
"run_name": "snakemake-job-RJq8LVs8BePl-rule-read_counter",
"mem": 1,
"cpu": 1,
"ebs_size": 66,
"log_bucket": "tibannatestdata"
},
"args": {
"output_S3_bucket": "tibannatestdata",
"language": "snakemake",
"container_image": "snakemake/snakemake",
"input_files": {
"file:///data1/snakemake/tibannatestdata/case6_WEX_T_sample.sorted.bqsr/case6_WEX_T_sample.sorted.bqsr.bam": "s3://tibannatestdata/case6_WEX_T_sample.sorted.bqsr/case6_WEX_T_sample.sorted.bqsr.bam"
},
"output_target": {
"file:///data1/snakemake/tibannatestdata/case6_WEX_T_sample.sorted.bqsr/readDepth/case6_WEX_T_sample.sorted.bqsr.bin1000000.wig": "s3://tibannatestdata/case6_WEX_T_sample.sorted.bqsr/readDepth/case6_WEX_T_sample.sorted.bqsr.bin1000000.wig",
"file:///data1/snakemake/tibannatestdata/test_logs/readDepth/case6_WEX_T_sample.sorted.bqsr.bin1000000.log": "s3://tibannatestdata/test_logs/readDepth/case6_WEX_T_sample.sorted.bqsr.bin1000000.log"
},
"snakemake_directory_local": "/home/ec2-user/tibanna_ichorCNA",
"snakemake_main_filename": "tibanna_ichorCNA_snakemake.mk",
"snakemake_child_filenames": [
"config.yaml",
"tibanna_samples.yaml"
],
"command": "snakemake tibannatestdata/case6_WEX_T_sample.sorted.bqsr/readDepth/case6_WEX_T_sample.sorted.bqsr.bin1000000.wig --snakefile tibanna_ichorCNA_snakemake.mk --force -j1 --keep-target-files --keep-remote --latency-wait 0 --attempt 1 --force-use-threads --allowed-rules read_counter --nocolor --notemp --no-hooks --nolock --default-resources "mem_mb=max(2input.size, 1000)" "disk_mb=max(2input.size, 1000)" "
}
}
about to start run snakemake-job-RJq8LVs8BePl-rule-read_counter
{'ResponseMetadata': {'RequestId': 'IG8R3PIP2Q43L11V2FJK9MRK5BVV4KQNSO5AEMVJF66Q9ASUAAJG', 'HTTPStatusCode': 200, 'HTTPHeaders': {'server': 'Server', 'date': 'Thu, 14 Nov 2019 21:55:26 GMT', 'content-type': 'application/x-amz-json-1.0', 'content-length': '2', 'connection': 'keep-alive', 'x-amzn-requestid': 'IG8R3PIP2Q43L11V2FJK9MRK5BVV4KQNSO5AEMVJF66Q9ASUAAJG', 'x-amz-crc32': '2745614147'}, 'RetryAttempts': 0}}
response from aws was:
{'executionArn': 'arn:aws:states:us-east-2:558013456147:execution:tibanna_unicorn_tibanna:snakemake-job-RJq8LVs8BePl-rule-read_counter', 'startDate': datetime.datetime(2019, 11, 14, 21, 55, 23, 969000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': 'eee0c541-0709-4a80-80db-2d9d1361787c', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'eee0c541-0709-4a80-80db-2d9d1361787c', 'content-type': 'application/x-amz-json-1.0', 'content-length': '164'}, 'RetryAttempts': 0}}
url to view status:
https://console.aws.amazon.com/states/home?region=us-east-2#/executions/details/arn:aws:states:us-east-2:558013456147:execution:tibanna_unicorn_tibanna:snakemake-job-RJq8LVs8BePl-rule-read_counter
JOBID RJq8LVs8BePl submitted
EXECUTION ARN = arn:aws:states:us-east-2:558013456147:execution:tibanna_unicorn_tibanna:snakemake-job-RJq8LVs8BePl-rule-read_counter
Couldn't get a file descriptor referring to the console
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: RUNNING
job snakemake-job-RJq8LVs8BePl-rule-read_counter: FAILED
Cleanup job metadata.
Shutting down, this might take some time.
shutting down Tibanna executor
Exiting because a job execution failed. Look above for error message
Complete log: /home/ec2-user/tibanna_ichorCNA/.snakemake/log/2019-11-14T215523.298444.snakemake.log
unlocking
removing lock
removing lock
removed all locks

@sengoku93
Copy link
Author

Please let me know if you want snakefile as well. Thanks!

@SooLee
Copy link
Member

SooLee commented Nov 14, 2019

Yes that would be helpful!

@SooLee
Copy link
Member

SooLee commented Nov 14, 2019

Do you use conda for installing dependencies? (If so, you'd need to add --use-conda option, but this may not be the problem because snakemake could not find a matching rule.)

@sengoku93
Copy link
Author

Attached
tibanna_ichorCNA_snakemake.txt

I am manually installing dependencies, am not using conda. In general, if software dependencies are installed correctly in instance that I am lauching tibanna, do I need a docker or conda environment? Thanks for your help!

@sengoku93
Copy link
Author

snakemake version is 5.7.4

@SooLee
Copy link
Member

SooLee commented Nov 14, 2019

I see. In terms of dependencies, you'd have to then use --precommand option to add the installation commands. What snakemake-tibanna does is to launch a new instance for each rule or group of rules (and terminates after the run completes for each rule or group of rules), so if something extra needs to be installed, it should be specified so that the same things are installed on every new instance. e.g. --precommand "apt-get install xyz, pip install xyz;"

@SooLee
Copy link
Member

SooLee commented Nov 14, 2019

In terms of log file not going to the S3 bucket, the directory must be under the current working directory (/data1/snakemake), so making the path to ./test_logs may work.

@SooLee
Copy link
Member

SooLee commented Nov 14, 2019

I'm not totally sure why snakemake could not find the rule. I will refer to this to snakemake in case Johannes has a better idea.

@SooLee
Copy link
Member

SooLee commented Nov 14, 2019

Ah, you can run snakemake --tibanna command on a local machine/server without being on the cloud. It will launch and coordinate EC2 instances for the jobs.

@sengoku93
Copy link
Author

sengoku93 commented Nov 14, 2019 via email

@SooLee
Copy link
Member

SooLee commented Nov 14, 2019

If the directory is a git repo, the shell script will also be automatically passed to an EC2 instance along with the other files, so it would be safe to call the shell script in --precommand.

@SooLee
Copy link
Member

SooLee commented Nov 14, 2019

Sure, we can keep this issue open until it's resolved.

@johanneskoester
Copy link

As the error says, check first if your input function of the rule read_counter does not produce an exception. Just convert the lambda expression into a real function and debug into it or print any raised exceptions. Maybe that sample identifier cannot be found in your config file, thus raising a key error?

@sengoku93
Copy link
Author

sengoku93 commented Nov 15, 2019

Hi Johannes,
I converted the lambda to real function:
"{samples}/{samples}.bam"

The dry run worked: rule read_counter:

rule read_counter:
input: tibannatestdata/case6_WEX_T_sample.sorted.bqsr/case6_WEX_T_sample.sorted.bqsr.bam
output: tibannatestdata/case6_WEX_T_sample.sorted.bqsr/readDepth/case6_WEX_T_sample.sorted.bqsr.bin1000000.wig
log: tibannatestdata/test_logs/readDepth/case6_WEX_T_sample.sorted.bqsr.bin1000000.log
jobid: 2
wildcards: samples=case6_WEX_T_sample.sorted.bqsr, binSize=1000000
resources: mem_mb=67354, disk_mb=67354

However it produces this same error:

raise Exception("output file {} upload to {} failed. %s".format(source, bucket + '/' + target) % e)
input: tibannatestdata/case6_WEX_T_sample.sorted.bqsr/case6_WEX_T_sample.sorted.bqsr.bam │Exception: output file /data1/snakemake/tibannatestdata/case6_WEX_T_sample.sorted.bqsr/readDepth/case6_WEX_
output: tibannatestdata/case6_WEX_T_sample.sorted.bqsr/readDepth/case6_WEX_T_sample.sorted.b│T_sample.sorted.bqsr.bin1000000.wig upload to tibannatestdata/case6_WEX_T_sample.sorted.bqsr/readDepth/case
qsr.bin1000000.wig │6_WEX_T_sample.sorted.bqsr.bin1000000.wig failed. [Errno 2] No such file or directory: '/data1/snakemake/ti
log: tibannatestdata/test_logs/readDepth/case6_WEX_T_sample.sorted.bqsr.bin1000000.log │bannatestdata/case6_WEX_T_sample.sorted.bqsr/readDepth/case6_WEX_T_sample.sorted.bqsr.bin1000000.wig'
jobid: 2 │Filesystem Size Used Avail Use% Mounted on
wildcards: samples=case6_WEX_T_sample.sorted.bqsr, binSize=1000000 │udev 475M 0 475M 0% /dev
resources: mem_mb=67354, disk_mb=67354

I am still getting same error as before. Do you know why it adds "/data1/snakemake" to the input path? I do no not have that path in the samples.yaml. Thank you !

@SooLee Thank you! I will continue to troubleshoot and post comments here. Thank you for your help

@sengoku93
Copy link
Author

tibannatest is name of s3 bucket

@SooLee
Copy link
Member

SooLee commented Nov 15, 2019

@sengoku93 /data1/snakemake is the default current working directory on the EC2 instance launched by Snakemake-Tibanna.

@sengoku93
Copy link
Author

I have attached new Snakemake and corresponding samples.yaml. I am not sure how to resolve this error. I have changed lambda function and am still gettin same error. Thanks
tibanna_ichorCNA_snakemake.txt
tibanna_samples.txt

@sengoku93
Copy link
Author

Ah, you can run snakemake --tibanna command on a local machine/server without being on the cloud. It will launch and coordinate EC2 instances for the jobs.

I am currently using snakelike --tibanna on an EC2. Is that okay?

@sengoku93
Copy link
Author

sengoku93 commented Nov 19, 2019

I have attached updated snakemake where I am explicitly stating remote paths. However, I am still getting same error as earlier. Please let me know if you have any suggestions. Apologies for multiple comments. Thank you!
Command line: snakemake --tibanna --default-remote-prefix=tibannatestdata -np -s tibanna_ichorCNA_snakemake.mk --use-conda --conda-prefix /home/ec2-user/miniconda3/envs/ichorCNA/

tibanna_ichorCNA_snakemake.txt

@sengoku93
Copy link
Author

Last quick question, can you load a specific AMI when tibanna launches instances to execute snakemake? Thanks

@sengoku93
Copy link
Author

sengoku93 commented Nov 19, 2019

Hi @SooLee ,

I was able to get log file successfully copied to S3. The errors I get from the log file is this:

/bin/bash: readCounter: command not found

Which means the Conda environment is not copying over to correct instance. I then updated snakemake to explicitly have Conda with corresponding environment.yaml. I am still getting same above error. Regarding snakemake error that started this whole post (#256), I believe it is due to this error I am getting now.

Command line for updated snakemake: snakemake --tibanna --default-remote-prefix=tibannatestdata -np -s tibanna_ichorCNA_snakemake.mk --use-conda

v2_tibanna_ichorCNA_snakemake.txt

Thank you!

@sengoku93
Copy link
Author

Hi,
Just wanted to follow up. I am still having same error. If you are not available for help, its okay. Please close the issue. Thanks for the suggestions/comments!

@SooLee
Copy link
Member

SooLee commented Dec 5, 2019

@sengoku93 Sorry I didn't get notified about the updates of this issue. I will take a look today.

@SooLee SooLee reopened this Dec 5, 2019
@sengoku93
Copy link
Author

I resolved issue. Thank you!

@sengoku93
Copy link
Author

I do have a question regarding how to specify Snakemake to look through folder of choice. For example if I want to run bwa mem, I would need reference hg38.fa which can be a param in snakemake. However, bwa mem needs the hg38.fa.fai file as well but since it is not specified in the snakemake, Tibanna can't find it. Would I put the .fai file as an input or a param to make sure tibanna can look for it appropriately? Thanks

@sengoku93
Copy link
Author

For example can I have a config.json as you would with tibanna+cwl, but instead for tibanna+snakemake? I do see that snakemake said it will support --configfile argument but I don't see any information if it is currently supported. Thank you!

@sengoku93
Copy link
Author

sengoku93 commented Dec 5, 2019

When running this command line:

snakemake --tibanna --default-remote-prefix=tibannatestdata -np -s v1_alignment.mk --use-conda --default-resources "mem_mb=max(4input.size, 10000)" "disk_mb=max(4input.size, 10000)"

I get the following error:

[bwt_restore_bwt] Failed to allocate 3209286160 bytes at bwt.c line 452: Cannot allocate memory

I believe it is because --default resources is not working as it should. I am using a test fastq with 30mb r1 and 30mb r2 fastqs. Is there a way to specify instant to be used? Or documentation regarding allocating memory? Thank you!

@sengoku93 sengoku93 reopened this Dec 9, 2019
@SooLee
Copy link
Member

SooLee commented Dec 9, 2019

@sengoku93 --configfile=config.json should be available with the --tibanna option. I'm not totally sure why the --default-resources is not working - do you mind sharing your log after you run it with -v option?

@SooLee
Copy link
Member

SooLee commented Dec 9, 2019

I will close this so that I can get notified when you reopen it. Sorry for the inconvenience.

@SooLee SooLee closed this as completed Dec 9, 2019
@sengoku93
Copy link
Author

When running with --verbose option:

Building DAG of jobs...
Unable to retrieve additional files from git. This is not a git repository.
sources=/home/ec2-user/tibanna_alignment/v1_alignment.mk/home/ec2-user/tibanna_alignment/pre_processing.yaml/home/ec2-user/tibanna_alignment/tibanna_samples.yaml
precommand=
bucket=tibannatestdata
subdir=tibannatestdata
Using shell: /usr/bin/bash
Provided cores: 9223372036854775807
Rules claiming more threads will be scaled down.
Job counts:
count jobs
1 ADD_READ_GROUP
1 APPLY_BQSR
1 BQSR_TABLE
1 BWA_MAP
1 MARK_DUPLICATES
1 SAMtoBAM
1 SORT_BAM
1 all
8
Resources before job selection: {'_cores': 9223372036854775807, '_nodes': 1}
Ready jobs (1):
BWA_MAP
Selected jobs (1):
BWA_MAP
Resources after job selection: {'_cores': 9223372036854775806, '_nodes': 0}
running job using Tibanna...

[Tue Dec 10 15:56:02 2019]
rule BWA_MAP:
input: tibannatestdata/case6_WEX_T_sample/fastq/case6_WEX_T_sample.read1.fastq, tibannatestdata/case6_WEX_T_sample/fastq/case6_WEX_T_sample.read2.fastq, tibannatestdata/reference/hg38.fa.fai, tibannatestdata/reference/hg38.dict, tibannatestdata/reference/hg38.fa.ann,
tibannatestdata/reference/hg38.fa.bwt, tibannatestdata/reference/hg38.fa.pac, tibannatestdata/reference/hg38.fa.sa
output: tibannatestdata/case6_WEX_T_sample/bwa_sam/case6_WEX_T_sample.sam
log: tibannatestdata/pre_processing_logs/bwa_sam/case6_WEX_T_sample.bwa_map.log
jobid: 7
wildcards: samples=case6_WEX_T_sample
resources: mem_mb=22194924, disk_mb=22194924

job input tibannatestdata/case6_WEX_T_sample/fastq/case6_WEX_T_sample.read1.fastq
job input is remote= true
is remote default= false
Building DAG of jobs...
Unable to retrieve additional files from git. This is not a git repository.
sources=/home/ec2-user/tibanna_alignment/v1_alignment.mk/home/ec2-user/tibanna_alignment/pre_processing.yaml/home/ec2-user/tibanna_alignment/tibanna_samples.yaml
precommand=
bucket=tibannatestdata
subdir=tibannatestdata
Using shell: /usr/bin/bash
Provided cores: 9223372036854775807
Rules claiming more threads will be scaled down.
Job counts:
count jobs
1 ADD_READ_GROUP
1 APPLY_BQSR
1 BQSR_TABLE
1 BWA_MAP
1 MARK_DUPLICATES
1 SAMtoBAM
1 SORT_BAM
1 all
8
Resources before job selection: {'_cores': 9223372036854775807, '_nodes': 1}
Ready jobs (1):
BWA_MAP
Selected jobs (1):
BWA_MAP
Resources after job selection: {'_cores': 9223372036854775806, '_nodes': 0}
running job using Tibanna...

[Tue Dec 10 15:56:02 2019]
rule BWA_MAP:
input: tibannatestdata/case6_WEX_T_sample/fastq/case6_WEX_T_sample.read1.fastq, tibannatestdata/case6_WEX_T_sample/fastq/case6_WEX_T_sample.read2.fastq, tibannatestdata/reference/hg38.fa.fai, tibannatestdata/reference/hg38.dict, tibannatestdata/reference/hg38.fa.ann,
tibannatestdata/reference/hg38.fa.bwt, tibannatestdata/reference/hg38.fa.pac, tibannatestdata/reference/hg38.fa.sa
output: tibannatestdata/case6_WEX_T_sample/bwa_sam/case6_WEX_T_sample.sam
log: tibannatestdata/pre_processing_logs/bwa_sam/case6_WEX_T_sample.bwa_map.log
jobid: 7
wildcards: samples=case6_WEX_T_sample
resources: mem_mb=22194924, disk_mb=22194924

job input tibannatestdata/case6_WEX_T_sample/fastq/case6_WEX_T_sample.read1.fastq
job input is remote= true
is remote default= false
job input tibannatestdata/case6_WEX_T_sample/fastq/case6_WEX_T_sample.read2.fastq
job input is remote= true
is remote default= false
job input tibannatestdata/reference/hg38.fa.fai
job input is remote= true
is remote default= false
job input tibannatestdata/reference/hg38.dict
job input is remote= true
is remote default= false
job input tibannatestdata/reference/hg38.fa.ann
job input is remote= true
is remote default= false
job input tibannatestdata/reference/hg38.fa.bwt
job input is remote= true
is remote default= false
job input tibannatestdata/reference/hg38.fa.pac
job input is remote= true
is remote default= false
job input tibannatestdata/reference/hg38.fa.sa
job input is remote= true
is remote default= false
job output tibannatestdata/case6_WEX_T_sample/bwa_sam/case6_WEX_T_sample.sam
job output is remote= true
is remote default= false
command = snakemake tibannatestdata/case6_WEX_T_sample/bwa_sam/case6_WEX_T_sample.sam --snakefile v1_alignment.mk --force -j1 --keep-target-files --keep-remote --latency-wait 0 --attempt 1 --force-use-threads --allowed-rules BWA_MAP --nocolor --notemp --no-hooks --nolock --use-conda --default-resources "mem_mb=max(4input.size, 10000)" "disk_mb=max(4input.size, 10000)"
about to start run snakemake-job-MsGePgbueEBN-rule-BWA_MAP
{'ResponseMetadata': {'RequestId': 'CBO7K5N9K6L3B158KB2TOB6EERVV4KQNSO5AEMVJF66Q9ASUAAJG', 'HTTPStatusCode': 200, 'HTTPHeaders': {'server': 'Server', 'date': 'Tue, 10 Dec 2019 15:56:06 GMT', 'content-type': 'application/x-amz-json-1.0', 'content-length': '2', 'connection'
: 'keep-alive', 'x-amzn-requestid': 'CBO7K5N9K6L3B158KB2TOB6EERVV4KQNSO5AEMVJF66Q9ASUAAJG', 'x-amz-crc32': '2745614147'}, 'RetryAttempts': 0}}
response from aws was:
{'executionArn': 'arn:aws:states:us-east-2:558013456147:execution:tibanna_unicorn_tibanna:snakemake-job-MsGePgbueEBN-rule-BWA_MAP', 'startDate': datetime.datetime(2019, 12, 10, 15, 56, 3, 104000, tzinfo=tzlocal()), 'ResponseMetadata': {'RequestId': '49c2ba61-24cc-4ea1-ad
0e-9c81119faa8c', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '49c2ba61-24cc-4ea1-ad0e-9c81119faa8c', 'content-type': 'application/x-amz-json-1.0', 'content-length': '159'}, 'RetryAttempts': 0}}
url to view status:
https://console.aws.amazon.com/states/home?region=us-east-2#/executions/details/arn:aws:states:us-east-2:558013456147:execution:tibanna_unicorn_tibanna:snakemake-job-MsGePgbueEBN-rule-BWA_MAP
JOBID MsGePgbueEBN submitted
EXECUTION ARN = arn:aws:states:us-east-2:558013456147:execution:tibanna_unicorn_tibanna:snakemake-job-MsGePgbueEBN-rule-BWA_MAP
Couldn't get a file descriptor referring to the console
job snakemake-job-MsGePgbueEBN-rule-BWA_MAP: FAILED
Cleanup job metadata.
Shutting down, this might take some time.
shutting down Tibanna executor
Exiting because a job execution failed. Look above for error message
Complete log: /home/ec2-user/tibanna_alignment/.snakemake/log/2019-12-10T155601.790266.snakemake.log
unlocking
removing lock
removing lock
removed all locks

F4abWDqaZn5Q-2.log

I will try with config file. Is there documentation describing config file specifically for snakemake? Thanks

@sengoku93
Copy link
Author

I can not reopen issue after you closed it.

@SooLee SooLee reopened this Dec 10, 2019
@SooLee
Copy link
Member

SooLee commented Dec 10, 2019

It looks like you requested 22Tb of memory. Was that intended? How large is your input file?
resources: mem_mb=22194924, disk_mb=22194924

@sengoku93
Copy link
Author

When using configfile where I specified the type of instance used ( in this case c2.5xlarge):

snakemake --tibanna --default-remote-prefix=tibannatestdata -s v1_alignment.mk --use-conda --configfile=config.json

config.txt

I get the error saying config file not found which makes sense because tibanna launches t3.micro instead of c2.5xlarge.

hQE9OPXaAOgH.log

@sengoku93
Copy link
Author

My input files are two truncated fastqs that are 30mb each.

@SooLee
Copy link
Member

SooLee commented Dec 10, 2019

Tibanna doesn't get the instance type from config. It will auto-determine the instance type based on cpu and memory requirements. The memory requirement calculation seemed wrong base on what I see. I opened an issue in the snakemake repo. (Memory calculation is global for snakemake and not specific for tibanna.) Can you try specifying the memory requirement inside the config file?

@SooLee
Copy link
Member

SooLee commented Dec 10, 2019

Ah and the config file must match the format of snakemake.

@sengoku93
Copy link
Author

Is there an example for the config file format for snakemake?

@sengoku93
Copy link
Author

Also, even though the fastq files were 30mb. I also had reference genome files that totaled to about 4gb. I am not sure if those are incorporated into the memory calculation. Thanks

@sengoku93 sengoku93 reopened this Dec 10, 2019
@SooLee
Copy link
Member

SooLee commented Dec 10, 2019

Actually yes, all the input files will be considered in the memory calculation.

@sengoku93
Copy link
Author

To clarify can you describe what the command below will do? (i.e what does the 10000 input do)
--default-resources "mem_mb=max(4input.size, 10000)" "disk_mb=max(4input.size, 10000)"

@SooLee
Copy link
Member

SooLee commented Dec 10, 2019

https://github.com/NIH-HPC/snakemake-class/blob/master/exercise06/Snakefile This is a random example snakefile and you can see how they specified memory inside this file. A config file can be used to redefine variables in snakefile. It should be somewhere in the Snakemake documentation.

@SooLee
Copy link
Member

SooLee commented Dec 10, 2019

The option means it will choose maximum between 4 x input size and 10,000mb. (and same for disk space)

@sengoku93
Copy link
Author

Okay thanks, I will look at the link you sent. So currently, there is not a way to specify instance type we would like to use? Thanks

@SooLee
Copy link
Member

SooLee commented Dec 10, 2019

nope, not through snakemake.

@sengoku93
Copy link
Author

Okay, no problem. Would tibanna + cwl offer option to choose instance type?
Lastly, I added resource parameter to snake file like you said and allocated 10,000mb. However, it still opens up a t3.micro instance. Not sure why it does this.

@SooLee
Copy link
Member

SooLee commented Dec 10, 2019

what does the log say? Yes with cwl, you can specify the instance types.

@BrunoFant
Copy link

Hi, Just wanted to follow up. I am still having same error. If you are not available for help, its okay. Please close the issue. Thanks for the suggestions/comments!

I resolved issue. Thank you!

Dear sengoku93, would you remember how you fixed the issue ? I am currently having the same one and would like to understand where I am going wrong. I think I am also setting my conda incorrectly. If you have any information in that regard, it would be greatly appreciated. Thanks ! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants