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

Help with understanding where files are written during the creation of combined.prot.xml #495

Open
Patrick-L-White opened this issue Jun 3, 2024 · 0 comments

Comments

@Patrick-L-White
Copy link

Hi,

Im having a problem where the combined.prot.xml is first being written to the root directory of my machine, which does not have enough space, and so the process fails. If it is possible I would like to have this file instead be written to the wrkdir and not be written first to the root drive. I see in the pip.go package where to my understanding the writing of combined.prot.xml happens, there is a command to change dir to the top level followed later on by a call to sys.copyfile to move the file, which I think is where this error is coming from. Am I understanding this correctly? Am I able to modify this in my philosopher executable myself? is there a passable argument I'm missing to define the top level directory?

Sorry for this open ended question but this has been a thorn in trying to run large datasets for a while now despite the fact that we have more than enough space on the machine in theory to write this file. Any help on this would be much appreciated!

reference to function in pip.go:

func CombinedProteinList(meta met.Data, p Directives, dir string, data []string) met.Data {

var combinedProtXML string

logrus.Info("Creating combined protein inference")

if p.Steps.IntegratedReports == "yes" && p.Abacus.Protein && len(p.Filter.Pox) == 0 {

	// return to the top level directory
	**os.Chdir(dir)**

	// reload the meta data
	meta.Restore(sys.Meta())

	meta.Home = dir
	meta.ProteinProphet = p.ProteinProphet
	meta.ProteinProphet.Output = "combined"
	meta.ProteinProphet.Minprob = p.Abacus.ProtProb

	var files []string

	for _, j := range data {
		fqn := fmt.Sprintf("%s%sinteract.pep.xml", j, string(filepath.Separator))
		if p.Steps.PTMLocalization == "yes" {
			fqn = fmt.Sprintf("%s%sinteract.mod.pep.xml", j, string(filepath.Separator))
		}
		fqn, _ = filepath.Abs(fqn)
		files = append(files, fqn)
	}

	proteinprophet.Run(meta, files)
	combinedProtXML = fmt.Sprintf("%s%scombined.prot.xml", meta.Temp, string(filepath.Separator))

	meta.Filter.Pox = combinedProtXML

	// copy to work directory
	sys.CopyFile(combinedProtXML, filepath.Base(combinedProtXML))
}
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

1 participant