sanjaynagi / AmpSeeker

A snakemake workflow for amplicon sequencing
https://sanjaynagi.github.io/AmpSeeker/
0 stars 3 forks source link

Common modifications #10

Closed ChabbyTMD closed 1 year ago

ChabbyTMD commented 1 year ago

This PR contains edits to Snakefile and common.smk. Added Features.

Not sure how to remove the miscellaneous commits from PR. Tried creating a new branch containing only the necessary changes, but it seems to bring over other commits too.

sanjaynagi commented 1 year ago

Hey Trevor! Thanks for this, that's great. Its passing the CI checks too :)

Im not entirely sure why the commits have been brought through. It may be because previously the commits were made to the main branch of your fork, and then when you made a new branch, it was made from the main branch and so contains any commits that were on main.

Generally, before you work on any new features or bugs, you want to make sure your fork is up to date with the original repo, and that you have a clean working tree (check git status). You can do this either by deleting your fork and re-forking, or by the following (i think!):

git remote add upstream https://github.com/sanjaynagi/AmpSeeker.git
git remote -v # verify new remote
git pull origin main

And then make sure you have a clean working tree, i.e there are no files which are staged for commit etc. If you need to remove files after doing git add then use git checkout - path/to/file.

If, as in your case, you make a new branch but it already has the old commits which you dont want, you need to remove the commits or revert the branch to an earlier state, but this is a bit more complicated, and I don't know how to do it off the top of my head.

In our case, we do actually need to remove some of the commits, because they add files which we don't want, such as extra fastq files and the bgziplite.smk file.

Essentially what we need to do is this https://stackoverflow.com/a/51400593. Do you think you could give that a go? you would need to replace n in the example with 25 (all the commits in this PR), and then drop only the first 10 commits (from last PR).

Then, after this PR is finished, I would recommend switching back to your main branch, and doing the steps I mentioned at the beginning of this comment to update the repo. No rush at all on any of this btw.

ChabbyTMD commented 1 year ago

Hi Sanjay,

Yes the mistake I made is I made modifications while I was working on my main branch of my fork. I think I'll go the route of deleting my existing fork and re-forking.

If I may ask a question, let's say I've created a branch to develop a feature, would the git pull procedure you specified above work to update my development branch with master upstream repo?

sanjaynagi commented 1 year ago

Yes it should do I think, though not 100% sure.