{"action":"created","issue":{"url":"https://api.github.com/repos/dib-lab/khmer/issues/1320","labels_url":"https://api.github.com/repos/dib-lab/khmer/issues/1320/labels{/name}","comments_url":"https://api.github.com/repos/dib-lab/khmer/issues/1320/comments","events_url":"https://api.github.com/repos/dib-lab/khmer/issues/1320/events","html_url":"https://github.com/dib-lab/khmer/issues/1320","id":113225811,"number":1320,"title":"normalize-by-median fails with -o/--output when multiple input files are given","user":{"login":"ctb","id":51016,"avatar_url":"https://avatars.githubusercontent.com/u/51016?v=3","gravatar_id":"","url":"https://api.github.com/users/ctb","html_url":"https://github.com/ctb","followers_url":"https://api.github.com/users/ctb/followers","following_url":"https://api.github.com/users/ctb/following{/other_user}","gists_url":"https://api.github.com/users/ctb/gists{/gist_id}","starred_url":"https://api.github.com/users/ctb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctb/subscriptions","organizations_url":"https://api.github.com/users/ctb/orgs","repos_url":"https://api.github.com/users/ctb/repos","events_url":"https://api.github.com/users/ctb/events{/privacy}","received_events_url":"https://api.github.com/users/ctb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-25T13:26:38Z","updated_at":"2015-10-25T13:30:06Z","closed_at":null,"body":"In the main loop of normalize-by-median.py, the outfile is closed after each input file - this causes problems when there are multiple input files.  See code:\r\n\r\nhttps://github.com/dib-lab/khmer/blob/53484edfaa5ff0f7c088e084b00f528d781d4c10/scripts/normalize-by-median.py#L403\r\n\r\nTo reproduce:\r\n\r\n    scripts/normalize-by-median.py data/100k-filtered.fa  data/100k-surrendered.fa -o xxx\r\n\r\nwhich yields:\r\n\r\n    ** ERROR: I/O operation on closed file\r\n    ** Failed on data/100k-surrendered.fa: \r\n    ** Exiting!\r\n\r\nWhile the output from the first file is correct, this then prevents the second file from being normalized."},"comment":{"url":"https://api.github.com/repos/dib-lab/khmer/issues/comments/150923426","html_url":"https://github.com/dib-lab/khmer/issues/1320#issuecomment-150923426","issue_url":"https://api.github.com/repos/dib-lab/khmer/issues/1320","id":150923426,"user":{"login":"ctb","id":51016,"avatar_url":"https://avatars.githubusercontent.com/u/51016?v=3","gravatar_id":"","url":"https://api.github.com/users/ctb","html_url":"https://github.com/ctb","followers_url":"https://api.github.com/users/ctb/followers","following_url":"https://api.github.com/users/ctb/following{/other_user}","gists_url":"https://api.github.com/users/ctb/gists{/gist_id}","starred_url":"https://api.github.com/users/ctb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctb/subscriptions","organizations_url":"https://api.github.com/users/ctb/orgs","repos_url":"https://api.github.com/users/ctb/repos","events_url":"https://api.github.com/users/ctb/events{/privacy}","received_events_url":"https://api.github.com/users/ctb/received_events","type":"User","site_admin":false},"created_at":"2015-10-25T13:30:06Z","updated_at":"2015-10-25T13:30:06Z","body":"(Reported by Marcelino Suzuki - thanx!)"}}