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

Keep alignments to metagenome #11

Open
adomingues opened this issue Dec 8, 2016 · 2 comments
Open

Keep alignments to metagenome #11

adomingues opened this issue Dec 8, 2016 · 2 comments

Comments

@adomingues
Copy link
Contributor

Hi again,

right now the output of repEnrich is the table with counts for each repeat element. However, there are times when it would be useful to have access to the alignments of reads to the metagenome. For instance I am interested in calculating the sense/antisense bias in each repeat element and that is not possible at the moment. It is also hard to make a metagene analysis like that in Fig.6B of Criscione et al. (2014). RepConsensus should fill this gap but I could not find it online to see if this functionality is already present. It might be better to use another tool to keep visualization consistent.

Since the multimapping read alignment is already done internally by RepEnrich.py using bowtie, it only needs an option to keep these alignments (bam). I am guessing the bams are deleted in this bit of the code. Is this correct? If so, something like this should do:

parser.add_argument('keeptemp', action= 'store', dest='keeptemp', default= 'FALSE', help='Indicates if mappings to the metagenome are kept for downstream analysis. These might be large files.')
keep_tmp = args.keeptemp

and then:

################################################################################
# Remove Large intermediate files
if os.path.exists(outputfolder + os.path.sep + outputfile_prefix + '_regionsorter.txt'):
	os.remove(outputfolder + os.path.sep + outputfile_prefix + '_regionsorter.txt')
if keep_tmp == 'FALSE':
	if os.path.exists(outputfolder + os.path.sep + 'pair1_bowtie'):
		shutil.rmtree(outputfolder + os.path.sep + 'pair1_bowtie')
	if os.path.exists(outputfolder + os.path.sep + 'pair2_bowtie'):
		shutil.rmtree(outputfolder + os.path.sep + 'pair2_bowtie')
	if os.path.exists(outputfolder + os.path.sep + 'sorted_bowtie'):
		shutil.rmtree(outputfolder + os.path.sep + 'sorted_bowtie')

Is this correct and could this option be included? Otherwise I will fork the project and try to add it.

Cheers

@nskvir
Copy link
Owner

nskvir commented Jan 12, 2017

Hey there -
Thanks for the comments! The former admin of this project (Steven Criscione) just graduated in December. I've recently joined the Neretti Lab and have been assigned to maintain and update this project in his place. I'm still familiarizing myself with the functionality and workings of the code at the moment but I will try to address this as soon as I can!

Best,
Nick

@adomingues
Copy link
Contributor Author

Hi Nicholas,
Cool. I will let you get a hold of things before bothering you again :) If you are open to it I could contribute to some fixes (depending on time). I already did that to RepConsensus and I could push the changes if you decide to put it on github. Otherwise I could mail them to you.
Best,
António

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

2 participants